/home/mdboom/Work/builds/cpython/Python/Python-ast.c
Line | Count | Source (jump to first uncovered line) |
1 | | // File automatically generated by Parser/asdl_c.py. |
2 | | |
3 | | #include "Python.h" |
4 | | #include "pycore_ast.h" |
5 | | #include "pycore_ast_state.h" // struct ast_state |
6 | | #include "pycore_ceval.h" // _Py_EnterRecursiveCall |
7 | | #include "pycore_interp.h" // _PyInterpreterState.ast |
8 | | #include "pycore_pystate.h" // _PyInterpreterState_GET() |
9 | | #include "structmember.h" |
10 | | #include <stddef.h> |
11 | | |
12 | | // Forward declaration |
13 | | static int init_types(struct ast_state *state); |
14 | | |
15 | | static struct ast_state* |
16 | | get_ast_state(void) |
17 | 32.5k | { |
18 | 32.5k | PyInterpreterState *interp = _PyInterpreterState_GET(); |
19 | 32.5k | struct ast_state *state = &interp->ast; |
20 | 32.5k | if (!init_types(state)) { Branch (20:9): [True: 0, False: 32.5k]
|
21 | 0 | return NULL; |
22 | 0 | } |
23 | 32.5k | return state; |
24 | 32.5k | } |
25 | | |
26 | | void _PyAST_Fini(PyInterpreterState *interp) |
27 | 272 | { |
28 | 272 | struct ast_state *state = &interp->ast; |
29 | | |
30 | 272 | Py_CLEAR(state->AST_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
31 | 272 | Py_CLEAR(state->Add_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
32 | 272 | Py_CLEAR(state->Add_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
33 | 272 | Py_CLEAR(state->And_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
34 | 272 | Py_CLEAR(state->And_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
35 | 272 | Py_CLEAR(state->AnnAssign_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
36 | 272 | Py_CLEAR(state->Assert_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
37 | 272 | Py_CLEAR(state->Assign_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
38 | 272 | Py_CLEAR(state->AsyncFor_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
39 | 272 | Py_CLEAR(state->AsyncFunctionDef_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
40 | 272 | Py_CLEAR(state->AsyncWith_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
41 | 272 | Py_CLEAR(state->Attribute_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
42 | 272 | Py_CLEAR(state->AugAssign_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
43 | 272 | Py_CLEAR(state->Await_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
44 | 272 | Py_CLEAR(state->BinOp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
45 | 272 | Py_CLEAR(state->BitAnd_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
46 | 272 | Py_CLEAR(state->BitAnd_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
47 | 272 | Py_CLEAR(state->BitOr_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
48 | 272 | Py_CLEAR(state->BitOr_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
49 | 272 | Py_CLEAR(state->BitXor_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
50 | 272 | Py_CLEAR(state->BitXor_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
51 | 272 | Py_CLEAR(state->BoolOp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
52 | 272 | Py_CLEAR(state->Break_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
53 | 272 | Py_CLEAR(state->Call_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
54 | 272 | Py_CLEAR(state->ClassDef_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
55 | 272 | Py_CLEAR(state->Compare_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
56 | 272 | Py_CLEAR(state->Constant_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
57 | 272 | Py_CLEAR(state->Continue_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
58 | 272 | Py_CLEAR(state->Del_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
59 | 272 | Py_CLEAR(state->Del_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
60 | 272 | Py_CLEAR(state->Delete_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
61 | 272 | Py_CLEAR(state->DictComp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
62 | 272 | Py_CLEAR(state->Dict_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
63 | 272 | Py_CLEAR(state->Div_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
64 | 272 | Py_CLEAR(state->Div_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
65 | 272 | Py_CLEAR(state->Eq_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
66 | 272 | Py_CLEAR(state->Eq_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
67 | 272 | Py_CLEAR(state->ExceptHandler_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
68 | 272 | Py_CLEAR(state->Expr_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
69 | 272 | Py_CLEAR(state->Expression_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
70 | 272 | Py_CLEAR(state->FloorDiv_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
71 | 272 | Py_CLEAR(state->FloorDiv_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
72 | 272 | Py_CLEAR(state->For_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
73 | 272 | Py_CLEAR(state->FormattedValue_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
74 | 272 | Py_CLEAR(state->FunctionDef_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
75 | 272 | Py_CLEAR(state->FunctionType_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
76 | 272 | Py_CLEAR(state->GeneratorExp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
77 | 272 | Py_CLEAR(state->Global_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
78 | 272 | Py_CLEAR(state->GtE_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
79 | 272 | Py_CLEAR(state->GtE_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
80 | 272 | Py_CLEAR(state->Gt_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
81 | 272 | Py_CLEAR(state->Gt_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
82 | 272 | Py_CLEAR(state->IfExp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
83 | 272 | Py_CLEAR(state->If_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
84 | 272 | Py_CLEAR(state->ImportFrom_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
85 | 272 | Py_CLEAR(state->Import_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
86 | 272 | Py_CLEAR(state->In_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
87 | 272 | Py_CLEAR(state->In_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
88 | 272 | Py_CLEAR(state->Interactive_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
89 | 272 | Py_CLEAR(state->Invert_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
90 | 272 | Py_CLEAR(state->Invert_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
91 | 272 | Py_CLEAR(state->IsNot_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
92 | 272 | Py_CLEAR(state->IsNot_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
93 | 272 | Py_CLEAR(state->Is_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
94 | 272 | Py_CLEAR(state->Is_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
95 | 272 | Py_CLEAR(state->JoinedStr_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
96 | 272 | Py_CLEAR(state->LShift_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
97 | 272 | Py_CLEAR(state->LShift_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
98 | 272 | Py_CLEAR(state->Lambda_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
99 | 272 | Py_CLEAR(state->ListComp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
100 | 272 | Py_CLEAR(state->List_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
101 | 272 | Py_CLEAR(state->Load_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
102 | 272 | Py_CLEAR(state->Load_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
103 | 272 | Py_CLEAR(state->LtE_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
104 | 272 | Py_CLEAR(state->LtE_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
105 | 272 | Py_CLEAR(state->Lt_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
106 | 272 | Py_CLEAR(state->Lt_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
107 | 272 | Py_CLEAR(state->MatMult_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
108 | 272 | Py_CLEAR(state->MatMult_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
109 | 272 | Py_CLEAR(state->MatchAs_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
110 | 272 | Py_CLEAR(state->MatchClass_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
111 | 272 | Py_CLEAR(state->MatchMapping_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
112 | 272 | Py_CLEAR(state->MatchOr_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
113 | 272 | Py_CLEAR(state->MatchSequence_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
114 | 272 | Py_CLEAR(state->MatchSingleton_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
115 | 272 | Py_CLEAR(state->MatchStar_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
116 | 272 | Py_CLEAR(state->MatchValue_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
117 | 272 | Py_CLEAR(state->Match_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
118 | 272 | Py_CLEAR(state->Mod_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
119 | 272 | Py_CLEAR(state->Mod_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
120 | 272 | Py_CLEAR(state->Module_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
121 | 272 | Py_CLEAR(state->Mult_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
122 | 272 | Py_CLEAR(state->Mult_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
123 | 272 | Py_CLEAR(state->Name_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
124 | 272 | Py_CLEAR(state->NamedExpr_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
125 | 272 | Py_CLEAR(state->Nonlocal_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
126 | 272 | Py_CLEAR(state->NotEq_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
127 | 272 | Py_CLEAR(state->NotEq_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
128 | 272 | Py_CLEAR(state->NotIn_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
129 | 272 | Py_CLEAR(state->NotIn_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
130 | 272 | Py_CLEAR(state->Not_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
131 | 272 | Py_CLEAR(state->Not_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
132 | 272 | Py_CLEAR(state->Or_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
133 | 272 | Py_CLEAR(state->Or_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
134 | 272 | Py_CLEAR(state->Pass_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
135 | 272 | Py_CLEAR(state->Pow_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
136 | 272 | Py_CLEAR(state->Pow_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
137 | 272 | Py_CLEAR(state->RShift_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
138 | 272 | Py_CLEAR(state->RShift_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
139 | 272 | Py_CLEAR(state->Raise_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
140 | 272 | Py_CLEAR(state->Return_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
141 | 272 | Py_CLEAR(state->SetComp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
142 | 272 | Py_CLEAR(state->Set_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
143 | 272 | Py_CLEAR(state->Slice_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
144 | 272 | Py_CLEAR(state->Starred_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
145 | 272 | Py_CLEAR(state->Store_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
146 | 272 | Py_CLEAR(state->Store_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
147 | 272 | Py_CLEAR(state->Sub_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
148 | 272 | Py_CLEAR(state->Sub_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
149 | 272 | Py_CLEAR(state->Subscript_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
150 | 272 | Py_CLEAR(state->TryStar_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
151 | 272 | Py_CLEAR(state->Try_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
152 | 272 | Py_CLEAR(state->Tuple_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
153 | 272 | Py_CLEAR(state->TypeIgnore_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
154 | 272 | Py_CLEAR(state->UAdd_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
155 | 272 | Py_CLEAR(state->UAdd_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
156 | 272 | Py_CLEAR(state->USub_singleton); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
157 | 272 | Py_CLEAR(state->USub_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
158 | 272 | Py_CLEAR(state->UnaryOp_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
159 | 272 | Py_CLEAR(state->While_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
160 | 272 | Py_CLEAR(state->With_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
161 | 272 | Py_CLEAR(state->YieldFrom_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
162 | 272 | Py_CLEAR(state->Yield_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
163 | 272 | Py_CLEAR(state->__dict__); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
164 | 272 | Py_CLEAR(state->__doc__); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
165 | 272 | Py_CLEAR(state->__match_args__); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
166 | 272 | Py_CLEAR(state->__module__); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
167 | 272 | Py_CLEAR(state->_attributes); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
168 | 272 | Py_CLEAR(state->_fields); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
169 | 272 | Py_CLEAR(state->alias_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
170 | 272 | Py_CLEAR(state->annotation); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
171 | 272 | Py_CLEAR(state->arg); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
172 | 272 | Py_CLEAR(state->arg_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
173 | 272 | Py_CLEAR(state->args); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
174 | 272 | Py_CLEAR(state->argtypes); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
175 | 272 | Py_CLEAR(state->arguments_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
176 | 272 | Py_CLEAR(state->asname); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
177 | 272 | Py_CLEAR(state->ast); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
178 | 272 | Py_CLEAR(state->attr); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
179 | 272 | Py_CLEAR(state->bases); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
180 | 272 | Py_CLEAR(state->body); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
181 | 272 | Py_CLEAR(state->boolop_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
182 | 272 | Py_CLEAR(state->cases); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
183 | 272 | Py_CLEAR(state->cause); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
184 | 272 | Py_CLEAR(state->cls); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
185 | 272 | Py_CLEAR(state->cmpop_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
186 | 272 | Py_CLEAR(state->col_offset); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
187 | 272 | Py_CLEAR(state->comparators); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
188 | 272 | Py_CLEAR(state->comprehension_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
189 | 272 | Py_CLEAR(state->context_expr); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
190 | 272 | Py_CLEAR(state->conversion); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
191 | 272 | Py_CLEAR(state->ctx); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
192 | 272 | Py_CLEAR(state->decorator_list); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
193 | 272 | Py_CLEAR(state->defaults); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
194 | 272 | Py_CLEAR(state->elt); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
195 | 272 | Py_CLEAR(state->elts); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
196 | 272 | Py_CLEAR(state->end_col_offset); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
197 | 272 | Py_CLEAR(state->end_lineno); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
198 | 272 | Py_CLEAR(state->exc); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
199 | 272 | Py_CLEAR(state->excepthandler_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
200 | 272 | Py_CLEAR(state->expr_context_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
201 | 272 | Py_CLEAR(state->expr_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
202 | 272 | Py_CLEAR(state->finalbody); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
203 | 272 | Py_CLEAR(state->format_spec); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
204 | 272 | Py_CLEAR(state->func); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
205 | 272 | Py_CLEAR(state->generators); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
206 | 272 | Py_CLEAR(state->guard); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
207 | 272 | Py_CLEAR(state->handlers); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
208 | 272 | Py_CLEAR(state->id); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
209 | 272 | Py_CLEAR(state->ifs); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
210 | 272 | Py_CLEAR(state->is_async); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
211 | 272 | Py_CLEAR(state->items); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
212 | 272 | Py_CLEAR(state->iter); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
213 | 272 | Py_CLEAR(state->key); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
214 | 272 | Py_CLEAR(state->keys); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
215 | 272 | Py_CLEAR(state->keyword_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
216 | 272 | Py_CLEAR(state->keywords); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
217 | 272 | Py_CLEAR(state->kind); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
218 | 272 | Py_CLEAR(state->kw_defaults); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
219 | 272 | Py_CLEAR(state->kwarg); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
220 | 272 | Py_CLEAR(state->kwd_attrs); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
221 | 272 | Py_CLEAR(state->kwd_patterns); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
222 | 272 | Py_CLEAR(state->kwonlyargs); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
223 | 272 | Py_CLEAR(state->left); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
224 | 272 | Py_CLEAR(state->level); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
225 | 272 | Py_CLEAR(state->lineno); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
226 | 272 | Py_CLEAR(state->lower); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
227 | 272 | Py_CLEAR(state->match_case_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
228 | 272 | Py_CLEAR(state->mod_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
229 | 272 | Py_CLEAR(state->module); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
230 | 272 | Py_CLEAR(state->msg); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
231 | 272 | Py_CLEAR(state->name); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
232 | 272 | Py_CLEAR(state->names); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
233 | 272 | Py_CLEAR(state->op); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
234 | 272 | Py_CLEAR(state->operand); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
235 | 272 | Py_CLEAR(state->operator_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
236 | 272 | Py_CLEAR(state->ops); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
237 | 272 | Py_CLEAR(state->optional_vars); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
238 | 272 | Py_CLEAR(state->orelse); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
239 | 272 | Py_CLEAR(state->pattern); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
240 | 272 | Py_CLEAR(state->pattern_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
241 | 272 | Py_CLEAR(state->patterns); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
242 | 272 | Py_CLEAR(state->posonlyargs); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
243 | 272 | Py_CLEAR(state->rest); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
244 | 272 | Py_CLEAR(state->returns); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
245 | 272 | Py_CLEAR(state->right); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
246 | 272 | Py_CLEAR(state->simple); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
247 | 272 | Py_CLEAR(state->slice); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
248 | 272 | Py_CLEAR(state->step); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
249 | 272 | Py_CLEAR(state->stmt_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
250 | 272 | Py_CLEAR(state->subject); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
251 | 272 | Py_CLEAR(state->tag); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
252 | 272 | Py_CLEAR(state->target); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
253 | 272 | Py_CLEAR(state->targets); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
254 | 272 | Py_CLEAR(state->test); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
255 | 272 | Py_CLEAR(state->type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
256 | 272 | Py_CLEAR(state->type_comment); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
257 | 272 | Py_CLEAR(state->type_ignore_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
258 | 272 | Py_CLEAR(state->type_ignores); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
259 | 272 | Py_CLEAR(state->unaryop_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
260 | 272 | Py_CLEAR(state->upper); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
261 | 272 | Py_CLEAR(state->value); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
262 | 272 | Py_CLEAR(state->values); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
263 | 272 | Py_CLEAR(state->vararg); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
264 | 272 | Py_CLEAR(state->withitem_type); Line | Count | Source | 587 | 272 | do { \ | 588 | 272 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 272 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 272 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 272 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 17, False: 255]
| 590 | 17 | (op) = NULL; \ | 591 | 17 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 17 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 17 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 17 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 17 | } \ | 593 | 272 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
265 | | |
266 | | #if !defined(NDEBUG) |
267 | | state->initialized = -1; |
268 | | #else |
269 | 272 | state->initialized = 0; |
270 | 272 | #endif |
271 | 272 | } |
272 | | |
273 | | static int init_identifiers(struct ast_state *state) |
274 | 19 | { |
275 | 19 | if ((state->__dict__ = PyUnicode_InternFromString("__dict__")) == NULL) return 0; Branch (275:9): [True: 0, False: 19]
|
276 | 19 | if ((state->__doc__ = PyUnicode_InternFromString("__doc__")) == NULL) return 0; Branch (276:9): [True: 0, False: 19]
|
277 | 19 | if ((state->__match_args__ = PyUnicode_InternFromString("__match_args__")) == NULL) return 0; Branch (277:9): [True: 0, False: 19]
|
278 | 19 | if ((state->__module__ = PyUnicode_InternFromString("__module__")) == NULL) return 0; Branch (278:9): [True: 0, False: 19]
|
279 | 19 | if ((state->_attributes = PyUnicode_InternFromString("_attributes")) == NULL) return 0; Branch (279:9): [True: 0, False: 19]
|
280 | 19 | if ((state->_fields = PyUnicode_InternFromString("_fields")) == NULL) return 0; Branch (280:9): [True: 0, False: 19]
|
281 | 19 | if ((state->annotation = PyUnicode_InternFromString("annotation")) == NULL) return 0; Branch (281:9): [True: 0, False: 19]
|
282 | 19 | if ((state->arg = PyUnicode_InternFromString("arg")) == NULL) return 0; Branch (282:9): [True: 0, False: 19]
|
283 | 19 | if ((state->args = PyUnicode_InternFromString("args")) == NULL) return 0; Branch (283:9): [True: 0, False: 19]
|
284 | 19 | if ((state->argtypes = PyUnicode_InternFromString("argtypes")) == NULL) return 0; Branch (284:9): [True: 0, False: 19]
|
285 | 19 | if ((state->asname = PyUnicode_InternFromString("asname")) == NULL) return 0; Branch (285:9): [True: 0, False: 19]
|
286 | 19 | if ((state->ast = PyUnicode_InternFromString("ast")) == NULL) return 0; Branch (286:9): [True: 0, False: 19]
|
287 | 19 | if ((state->attr = PyUnicode_InternFromString("attr")) == NULL) return 0; Branch (287:9): [True: 0, False: 19]
|
288 | 19 | if ((state->bases = PyUnicode_InternFromString("bases")) == NULL) return 0; Branch (288:9): [True: 0, False: 19]
|
289 | 19 | if ((state->body = PyUnicode_InternFromString("body")) == NULL) return 0; Branch (289:9): [True: 0, False: 19]
|
290 | 19 | if ((state->cases = PyUnicode_InternFromString("cases")) == NULL) return 0; Branch (290:9): [True: 0, False: 19]
|
291 | 19 | if ((state->cause = PyUnicode_InternFromString("cause")) == NULL) return 0; Branch (291:9): [True: 0, False: 19]
|
292 | 19 | if ((state->cls = PyUnicode_InternFromString("cls")) == NULL) return 0; Branch (292:9): [True: 0, False: 19]
|
293 | 19 | if ((state->col_offset = PyUnicode_InternFromString("col_offset")) == NULL) return 0; Branch (293:9): [True: 0, False: 19]
|
294 | 19 | if ((state->comparators = PyUnicode_InternFromString("comparators")) == NULL) return 0; Branch (294:9): [True: 0, False: 19]
|
295 | 19 | if ((state->context_expr = PyUnicode_InternFromString("context_expr")) == NULL) return 0; Branch (295:9): [True: 0, False: 19]
|
296 | 19 | if ((state->conversion = PyUnicode_InternFromString("conversion")) == NULL) return 0; Branch (296:9): [True: 0, False: 19]
|
297 | 19 | if ((state->ctx = PyUnicode_InternFromString("ctx")) == NULL) return 0; Branch (297:9): [True: 0, False: 19]
|
298 | 19 | if ((state->decorator_list = PyUnicode_InternFromString("decorator_list")) == NULL) return 0; Branch (298:9): [True: 0, False: 19]
|
299 | 19 | if ((state->defaults = PyUnicode_InternFromString("defaults")) == NULL) return 0; Branch (299:9): [True: 0, False: 19]
|
300 | 19 | if ((state->elt = PyUnicode_InternFromString("elt")) == NULL) return 0; Branch (300:9): [True: 0, False: 19]
|
301 | 19 | if ((state->elts = PyUnicode_InternFromString("elts")) == NULL) return 0; Branch (301:9): [True: 0, False: 19]
|
302 | 19 | if ((state->end_col_offset = PyUnicode_InternFromString("end_col_offset")) == NULL) return 0; Branch (302:9): [True: 0, False: 19]
|
303 | 19 | if ((state->end_lineno = PyUnicode_InternFromString("end_lineno")) == NULL) return 0; Branch (303:9): [True: 0, False: 19]
|
304 | 19 | if ((state->exc = PyUnicode_InternFromString("exc")) == NULL) return 0; Branch (304:9): [True: 0, False: 19]
|
305 | 19 | if ((state->finalbody = PyUnicode_InternFromString("finalbody")) == NULL) return 0; Branch (305:9): [True: 0, False: 19]
|
306 | 19 | if ((state->format_spec = PyUnicode_InternFromString("format_spec")) == NULL) return 0; Branch (306:9): [True: 0, False: 19]
|
307 | 19 | if ((state->func = PyUnicode_InternFromString("func")) == NULL) return 0; Branch (307:9): [True: 0, False: 19]
|
308 | 19 | if ((state->generators = PyUnicode_InternFromString("generators")) == NULL) return 0; Branch (308:9): [True: 0, False: 19]
|
309 | 19 | if ((state->guard = PyUnicode_InternFromString("guard")) == NULL) return 0; Branch (309:9): [True: 0, False: 19]
|
310 | 19 | if ((state->handlers = PyUnicode_InternFromString("handlers")) == NULL) return 0; Branch (310:9): [True: 0, False: 19]
|
311 | 19 | if ((state->id = PyUnicode_InternFromString("id")) == NULL) return 0; Branch (311:9): [True: 0, False: 19]
|
312 | 19 | if ((state->ifs = PyUnicode_InternFromString("ifs")) == NULL) return 0; Branch (312:9): [True: 0, False: 19]
|
313 | 19 | if ((state->is_async = PyUnicode_InternFromString("is_async")) == NULL) return 0; Branch (313:9): [True: 0, False: 19]
|
314 | 19 | if ((state->items = PyUnicode_InternFromString("items")) == NULL) return 0; Branch (314:9): [True: 0, False: 19]
|
315 | 19 | if ((state->iter = PyUnicode_InternFromString("iter")) == NULL) return 0; Branch (315:9): [True: 0, False: 19]
|
316 | 19 | if ((state->key = PyUnicode_InternFromString("key")) == NULL) return 0; Branch (316:9): [True: 0, False: 19]
|
317 | 19 | if ((state->keys = PyUnicode_InternFromString("keys")) == NULL) return 0; Branch (317:9): [True: 0, False: 19]
|
318 | 19 | if ((state->keywords = PyUnicode_InternFromString("keywords")) == NULL) return 0; Branch (318:9): [True: 0, False: 19]
|
319 | 19 | if ((state->kind = PyUnicode_InternFromString("kind")) == NULL) return 0; Branch (319:9): [True: 0, False: 19]
|
320 | 19 | if ((state->kw_defaults = PyUnicode_InternFromString("kw_defaults")) == NULL) return 0; Branch (320:9): [True: 0, False: 19]
|
321 | 19 | if ((state->kwarg = PyUnicode_InternFromString("kwarg")) == NULL) return 0; Branch (321:9): [True: 0, False: 19]
|
322 | 19 | if ((state->kwd_attrs = PyUnicode_InternFromString("kwd_attrs")) == NULL) return 0; Branch (322:9): [True: 0, False: 19]
|
323 | 19 | if ((state->kwd_patterns = PyUnicode_InternFromString("kwd_patterns")) == NULL) return 0; Branch (323:9): [True: 0, False: 19]
|
324 | 19 | if ((state->kwonlyargs = PyUnicode_InternFromString("kwonlyargs")) == NULL) return 0; Branch (324:9): [True: 0, False: 19]
|
325 | 19 | if ((state->left = PyUnicode_InternFromString("left")) == NULL) return 0; Branch (325:9): [True: 0, False: 19]
|
326 | 19 | if ((state->level = PyUnicode_InternFromString("level")) == NULL) return 0; Branch (326:9): [True: 0, False: 19]
|
327 | 19 | if ((state->lineno = PyUnicode_InternFromString("lineno")) == NULL) return 0; Branch (327:9): [True: 0, False: 19]
|
328 | 19 | if ((state->lower = PyUnicode_InternFromString("lower")) == NULL) return 0; Branch (328:9): [True: 0, False: 19]
|
329 | 19 | if ((state->module = PyUnicode_InternFromString("module")) == NULL) return 0; Branch (329:9): [True: 0, False: 19]
|
330 | 19 | if ((state->msg = PyUnicode_InternFromString("msg")) == NULL) return 0; Branch (330:9): [True: 0, False: 19]
|
331 | 19 | if ((state->name = PyUnicode_InternFromString("name")) == NULL) return 0; Branch (331:9): [True: 0, False: 19]
|
332 | 19 | if ((state->names = PyUnicode_InternFromString("names")) == NULL) return 0; Branch (332:9): [True: 0, False: 19]
|
333 | 19 | if ((state->op = PyUnicode_InternFromString("op")) == NULL) return 0; Branch (333:9): [True: 0, False: 19]
|
334 | 19 | if ((state->operand = PyUnicode_InternFromString("operand")) == NULL) return 0; Branch (334:9): [True: 0, False: 19]
|
335 | 19 | if ((state->ops = PyUnicode_InternFromString("ops")) == NULL) return 0; Branch (335:9): [True: 0, False: 19]
|
336 | 19 | if ((state->optional_vars = PyUnicode_InternFromString("optional_vars")) == NULL) return 0; Branch (336:9): [True: 0, False: 19]
|
337 | 19 | if ((state->orelse = PyUnicode_InternFromString("orelse")) == NULL) return 0; Branch (337:9): [True: 0, False: 19]
|
338 | 19 | if ((state->pattern = PyUnicode_InternFromString("pattern")) == NULL) return 0; Branch (338:9): [True: 0, False: 19]
|
339 | 19 | if ((state->patterns = PyUnicode_InternFromString("patterns")) == NULL) return 0; Branch (339:9): [True: 0, False: 19]
|
340 | 19 | if ((state->posonlyargs = PyUnicode_InternFromString("posonlyargs")) == NULL) return 0; Branch (340:9): [True: 0, False: 19]
|
341 | 19 | if ((state->rest = PyUnicode_InternFromString("rest")) == NULL) return 0; Branch (341:9): [True: 0, False: 19]
|
342 | 19 | if ((state->returns = PyUnicode_InternFromString("returns")) == NULL) return 0; Branch (342:9): [True: 0, False: 19]
|
343 | 19 | if ((state->right = PyUnicode_InternFromString("right")) == NULL) return 0; Branch (343:9): [True: 0, False: 19]
|
344 | 19 | if ((state->simple = PyUnicode_InternFromString("simple")) == NULL) return 0; Branch (344:9): [True: 0, False: 19]
|
345 | 19 | if ((state->slice = PyUnicode_InternFromString("slice")) == NULL) return 0; Branch (345:9): [True: 0, False: 19]
|
346 | 19 | if ((state->step = PyUnicode_InternFromString("step")) == NULL) return 0; Branch (346:9): [True: 0, False: 19]
|
347 | 19 | if ((state->subject = PyUnicode_InternFromString("subject")) == NULL) return 0; Branch (347:9): [True: 0, False: 19]
|
348 | 19 | if ((state->tag = PyUnicode_InternFromString("tag")) == NULL) return 0; Branch (348:9): [True: 0, False: 19]
|
349 | 19 | if ((state->target = PyUnicode_InternFromString("target")) == NULL) return 0; Branch (349:9): [True: 0, False: 19]
|
350 | 19 | if ((state->targets = PyUnicode_InternFromString("targets")) == NULL) return 0; Branch (350:9): [True: 0, False: 19]
|
351 | 19 | if ((state->test = PyUnicode_InternFromString("test")) == NULL) return 0; Branch (351:9): [True: 0, False: 19]
|
352 | 19 | if ((state->type = PyUnicode_InternFromString("type")) == NULL) return 0; Branch (352:9): [True: 0, False: 19]
|
353 | 19 | if ((state->type_comment = PyUnicode_InternFromString("type_comment")) == NULL) return 0; Branch (353:9): [True: 0, False: 19]
|
354 | 19 | if ((state->type_ignores = PyUnicode_InternFromString("type_ignores")) == NULL) return 0; Branch (354:9): [True: 0, False: 19]
|
355 | 19 | if ((state->upper = PyUnicode_InternFromString("upper")) == NULL) return 0; Branch (355:9): [True: 0, False: 19]
|
356 | 19 | if ((state->value = PyUnicode_InternFromString("value")) == NULL) return 0; Branch (356:9): [True: 0, False: 19]
|
357 | 19 | if ((state->values = PyUnicode_InternFromString("values")) == NULL) return 0; Branch (357:9): [True: 0, False: 19]
|
358 | 19 | if ((state->vararg = PyUnicode_InternFromString("vararg")) == NULL) return 0; Branch (358:9): [True: 0, False: 19]
|
359 | 19 | return 1; |
360 | 19 | }; |
361 | | |
362 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(mod, mod_ty) |
363 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(stmt, stmt_ty) |
364 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(expr, expr_ty) |
365 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(comprehension, comprehension_ty) |
366 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(excepthandler, excepthandler_ty) |
367 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(arguments, arguments_ty) |
368 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(arg, arg_ty) |
369 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(keyword, keyword_ty) |
370 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(alias, alias_ty) |
371 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(withitem, withitem_ty) |
372 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(match_case, match_case_ty) |
373 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(pattern, pattern_ty) |
374 | | GENERATE_ASDL_SEQ_CONSTRUCTOR(type_ignore, type_ignore_ty) |
375 | | |
376 | | static PyObject* ast2obj_mod(struct ast_state *state, void*); |
377 | | static const char * const Module_fields[]={ |
378 | | "body", |
379 | | "type_ignores", |
380 | | }; |
381 | | static const char * const Interactive_fields[]={ |
382 | | "body", |
383 | | }; |
384 | | static const char * const Expression_fields[]={ |
385 | | "body", |
386 | | }; |
387 | | static const char * const FunctionType_fields[]={ |
388 | | "argtypes", |
389 | | "returns", |
390 | | }; |
391 | | static const char * const stmt_attributes[] = { |
392 | | "lineno", |
393 | | "col_offset", |
394 | | "end_lineno", |
395 | | "end_col_offset", |
396 | | }; |
397 | | static PyObject* ast2obj_stmt(struct ast_state *state, void*); |
398 | | static const char * const FunctionDef_fields[]={ |
399 | | "name", |
400 | | "args", |
401 | | "body", |
402 | | "decorator_list", |
403 | | "returns", |
404 | | "type_comment", |
405 | | }; |
406 | | static const char * const AsyncFunctionDef_fields[]={ |
407 | | "name", |
408 | | "args", |
409 | | "body", |
410 | | "decorator_list", |
411 | | "returns", |
412 | | "type_comment", |
413 | | }; |
414 | | static const char * const ClassDef_fields[]={ |
415 | | "name", |
416 | | "bases", |
417 | | "keywords", |
418 | | "body", |
419 | | "decorator_list", |
420 | | }; |
421 | | static const char * const Return_fields[]={ |
422 | | "value", |
423 | | }; |
424 | | static const char * const Delete_fields[]={ |
425 | | "targets", |
426 | | }; |
427 | | static const char * const Assign_fields[]={ |
428 | | "targets", |
429 | | "value", |
430 | | "type_comment", |
431 | | }; |
432 | | static const char * const AugAssign_fields[]={ |
433 | | "target", |
434 | | "op", |
435 | | "value", |
436 | | }; |
437 | | static const char * const AnnAssign_fields[]={ |
438 | | "target", |
439 | | "annotation", |
440 | | "value", |
441 | | "simple", |
442 | | }; |
443 | | static const char * const For_fields[]={ |
444 | | "target", |
445 | | "iter", |
446 | | "body", |
447 | | "orelse", |
448 | | "type_comment", |
449 | | }; |
450 | | static const char * const AsyncFor_fields[]={ |
451 | | "target", |
452 | | "iter", |
453 | | "body", |
454 | | "orelse", |
455 | | "type_comment", |
456 | | }; |
457 | | static const char * const While_fields[]={ |
458 | | "test", |
459 | | "body", |
460 | | "orelse", |
461 | | }; |
462 | | static const char * const If_fields[]={ |
463 | | "test", |
464 | | "body", |
465 | | "orelse", |
466 | | }; |
467 | | static const char * const With_fields[]={ |
468 | | "items", |
469 | | "body", |
470 | | "type_comment", |
471 | | }; |
472 | | static const char * const AsyncWith_fields[]={ |
473 | | "items", |
474 | | "body", |
475 | | "type_comment", |
476 | | }; |
477 | | static const char * const Match_fields[]={ |
478 | | "subject", |
479 | | "cases", |
480 | | }; |
481 | | static const char * const Raise_fields[]={ |
482 | | "exc", |
483 | | "cause", |
484 | | }; |
485 | | static const char * const Try_fields[]={ |
486 | | "body", |
487 | | "handlers", |
488 | | "orelse", |
489 | | "finalbody", |
490 | | }; |
491 | | static const char * const TryStar_fields[]={ |
492 | | "body", |
493 | | "handlers", |
494 | | "orelse", |
495 | | "finalbody", |
496 | | }; |
497 | | static const char * const Assert_fields[]={ |
498 | | "test", |
499 | | "msg", |
500 | | }; |
501 | | static const char * const Import_fields[]={ |
502 | | "names", |
503 | | }; |
504 | | static const char * const ImportFrom_fields[]={ |
505 | | "module", |
506 | | "names", |
507 | | "level", |
508 | | }; |
509 | | static const char * const Global_fields[]={ |
510 | | "names", |
511 | | }; |
512 | | static const char * const Nonlocal_fields[]={ |
513 | | "names", |
514 | | }; |
515 | | static const char * const Expr_fields[]={ |
516 | | "value", |
517 | | }; |
518 | | static const char * const expr_attributes[] = { |
519 | | "lineno", |
520 | | "col_offset", |
521 | | "end_lineno", |
522 | | "end_col_offset", |
523 | | }; |
524 | | static PyObject* ast2obj_expr(struct ast_state *state, void*); |
525 | | static const char * const BoolOp_fields[]={ |
526 | | "op", |
527 | | "values", |
528 | | }; |
529 | | static const char * const NamedExpr_fields[]={ |
530 | | "target", |
531 | | "value", |
532 | | }; |
533 | | static const char * const BinOp_fields[]={ |
534 | | "left", |
535 | | "op", |
536 | | "right", |
537 | | }; |
538 | | static const char * const UnaryOp_fields[]={ |
539 | | "op", |
540 | | "operand", |
541 | | }; |
542 | | static const char * const Lambda_fields[]={ |
543 | | "args", |
544 | | "body", |
545 | | }; |
546 | | static const char * const IfExp_fields[]={ |
547 | | "test", |
548 | | "body", |
549 | | "orelse", |
550 | | }; |
551 | | static const char * const Dict_fields[]={ |
552 | | "keys", |
553 | | "values", |
554 | | }; |
555 | | static const char * const Set_fields[]={ |
556 | | "elts", |
557 | | }; |
558 | | static const char * const ListComp_fields[]={ |
559 | | "elt", |
560 | | "generators", |
561 | | }; |
562 | | static const char * const SetComp_fields[]={ |
563 | | "elt", |
564 | | "generators", |
565 | | }; |
566 | | static const char * const DictComp_fields[]={ |
567 | | "key", |
568 | | "value", |
569 | | "generators", |
570 | | }; |
571 | | static const char * const GeneratorExp_fields[]={ |
572 | | "elt", |
573 | | "generators", |
574 | | }; |
575 | | static const char * const Await_fields[]={ |
576 | | "value", |
577 | | }; |
578 | | static const char * const Yield_fields[]={ |
579 | | "value", |
580 | | }; |
581 | | static const char * const YieldFrom_fields[]={ |
582 | | "value", |
583 | | }; |
584 | | static const char * const Compare_fields[]={ |
585 | | "left", |
586 | | "ops", |
587 | | "comparators", |
588 | | }; |
589 | | static const char * const Call_fields[]={ |
590 | | "func", |
591 | | "args", |
592 | | "keywords", |
593 | | }; |
594 | | static const char * const FormattedValue_fields[]={ |
595 | | "value", |
596 | | "conversion", |
597 | | "format_spec", |
598 | | }; |
599 | | static const char * const JoinedStr_fields[]={ |
600 | | "values", |
601 | | }; |
602 | | static const char * const Constant_fields[]={ |
603 | | "value", |
604 | | "kind", |
605 | | }; |
606 | | static const char * const Attribute_fields[]={ |
607 | | "value", |
608 | | "attr", |
609 | | "ctx", |
610 | | }; |
611 | | static const char * const Subscript_fields[]={ |
612 | | "value", |
613 | | "slice", |
614 | | "ctx", |
615 | | }; |
616 | | static const char * const Starred_fields[]={ |
617 | | "value", |
618 | | "ctx", |
619 | | }; |
620 | | static const char * const Name_fields[]={ |
621 | | "id", |
622 | | "ctx", |
623 | | }; |
624 | | static const char * const List_fields[]={ |
625 | | "elts", |
626 | | "ctx", |
627 | | }; |
628 | | static const char * const Tuple_fields[]={ |
629 | | "elts", |
630 | | "ctx", |
631 | | }; |
632 | | static const char * const Slice_fields[]={ |
633 | | "lower", |
634 | | "upper", |
635 | | "step", |
636 | | }; |
637 | | static PyObject* ast2obj_expr_context(struct ast_state *state, expr_context_ty); |
638 | | static PyObject* ast2obj_boolop(struct ast_state *state, boolop_ty); |
639 | | static PyObject* ast2obj_operator(struct ast_state *state, operator_ty); |
640 | | static PyObject* ast2obj_unaryop(struct ast_state *state, unaryop_ty); |
641 | | static PyObject* ast2obj_cmpop(struct ast_state *state, cmpop_ty); |
642 | | static PyObject* ast2obj_comprehension(struct ast_state *state, void*); |
643 | | static const char * const comprehension_fields[]={ |
644 | | "target", |
645 | | "iter", |
646 | | "ifs", |
647 | | "is_async", |
648 | | }; |
649 | | static const char * const excepthandler_attributes[] = { |
650 | | "lineno", |
651 | | "col_offset", |
652 | | "end_lineno", |
653 | | "end_col_offset", |
654 | | }; |
655 | | static PyObject* ast2obj_excepthandler(struct ast_state *state, void*); |
656 | | static const char * const ExceptHandler_fields[]={ |
657 | | "type", |
658 | | "name", |
659 | | "body", |
660 | | }; |
661 | | static PyObject* ast2obj_arguments(struct ast_state *state, void*); |
662 | | static const char * const arguments_fields[]={ |
663 | | "posonlyargs", |
664 | | "args", |
665 | | "vararg", |
666 | | "kwonlyargs", |
667 | | "kw_defaults", |
668 | | "kwarg", |
669 | | "defaults", |
670 | | }; |
671 | | static PyObject* ast2obj_arg(struct ast_state *state, void*); |
672 | | static const char * const arg_attributes[] = { |
673 | | "lineno", |
674 | | "col_offset", |
675 | | "end_lineno", |
676 | | "end_col_offset", |
677 | | }; |
678 | | static const char * const arg_fields[]={ |
679 | | "arg", |
680 | | "annotation", |
681 | | "type_comment", |
682 | | }; |
683 | | static PyObject* ast2obj_keyword(struct ast_state *state, void*); |
684 | | static const char * const keyword_attributes[] = { |
685 | | "lineno", |
686 | | "col_offset", |
687 | | "end_lineno", |
688 | | "end_col_offset", |
689 | | }; |
690 | | static const char * const keyword_fields[]={ |
691 | | "arg", |
692 | | "value", |
693 | | }; |
694 | | static PyObject* ast2obj_alias(struct ast_state *state, void*); |
695 | | static const char * const alias_attributes[] = { |
696 | | "lineno", |
697 | | "col_offset", |
698 | | "end_lineno", |
699 | | "end_col_offset", |
700 | | }; |
701 | | static const char * const alias_fields[]={ |
702 | | "name", |
703 | | "asname", |
704 | | }; |
705 | | static PyObject* ast2obj_withitem(struct ast_state *state, void*); |
706 | | static const char * const withitem_fields[]={ |
707 | | "context_expr", |
708 | | "optional_vars", |
709 | | }; |
710 | | static PyObject* ast2obj_match_case(struct ast_state *state, void*); |
711 | | static const char * const match_case_fields[]={ |
712 | | "pattern", |
713 | | "guard", |
714 | | "body", |
715 | | }; |
716 | | static const char * const pattern_attributes[] = { |
717 | | "lineno", |
718 | | "col_offset", |
719 | | "end_lineno", |
720 | | "end_col_offset", |
721 | | }; |
722 | | static PyObject* ast2obj_pattern(struct ast_state *state, void*); |
723 | | static const char * const MatchValue_fields[]={ |
724 | | "value", |
725 | | }; |
726 | | static const char * const MatchSingleton_fields[]={ |
727 | | "value", |
728 | | }; |
729 | | static const char * const MatchSequence_fields[]={ |
730 | | "patterns", |
731 | | }; |
732 | | static const char * const MatchMapping_fields[]={ |
733 | | "keys", |
734 | | "patterns", |
735 | | "rest", |
736 | | }; |
737 | | static const char * const MatchClass_fields[]={ |
738 | | "cls", |
739 | | "patterns", |
740 | | "kwd_attrs", |
741 | | "kwd_patterns", |
742 | | }; |
743 | | static const char * const MatchStar_fields[]={ |
744 | | "name", |
745 | | }; |
746 | | static const char * const MatchAs_fields[]={ |
747 | | "pattern", |
748 | | "name", |
749 | | }; |
750 | | static const char * const MatchOr_fields[]={ |
751 | | "patterns", |
752 | | }; |
753 | | static PyObject* ast2obj_type_ignore(struct ast_state *state, void*); |
754 | | static const char * const TypeIgnore_fields[]={ |
755 | | "lineno", |
756 | | "tag", |
757 | | }; |
758 | | |
759 | | |
760 | | |
761 | | typedef struct { |
762 | | PyObject_HEAD |
763 | | PyObject *dict; |
764 | | } AST_object; |
765 | | |
766 | | static void |
767 | | ast_dealloc(AST_object *self) |
768 | 847k | { |
769 | | /* bpo-31095: UnTrack is needed before calling any callbacks */ |
770 | 847k | PyTypeObject *tp = Py_TYPE(self); Line | Count | Source | 138 | 847k | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 847k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 847k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
771 | 847k | PyObject_GC_UnTrack(self); |
772 | 847k | Py_CLEAR(self->dict); Line | Count | Source | 587 | 847k | do { \ | 588 | 847k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 847k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 847k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 847k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 846k, False: 879]
| 590 | 846k | (op) = NULL; \ | 591 | 846k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 846k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 846k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 846k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 846k | } \ | 593 | 847k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
773 | 847k | freefunc free_func = PyType_GetSlot(tp, Py_tp_free); Line | Count | Source | 75 | 847k | #define Py_tp_free 74 |
|
774 | 847k | assert(free_func != NULL); |
775 | 847k | free_func(self); |
776 | 847k | Py_DECREF(tp); Line | Count | Source | 548 | 847k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 847k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 847k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
777 | 847k | } |
778 | | |
779 | | static int |
780 | | ast_traverse(AST_object *self, visitproc visit, void *arg) |
781 | 5.15M | { |
782 | 5.15M | Py_VISIT(Py_TYPE(self)); Line | Count | Source | 198 | 5.15M | do { \ | 199 | 5.15M | if (op) { \ Branch (199:13): [True: 5.15M, False: 0]
| 200 | 5.15M | int vret = visit(_PyObject_CAST(op), arg); \ Line | Count | Source | 109 | 5.15M | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.15M | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 201 | 5.15M | if (vret) \ Branch (201:17): [True: 0, False: 5.15M]
| 202 | 5.15M | return vret; \ | 203 | 5.15M | } \ | 204 | 5.15M | } while (0) Branch (204:14): [Folded - Ignored]
|
|
783 | 5.15M | Py_VISIT(self->dict); Line | Count | Source | 198 | 5.15M | do { \ | 199 | 5.15M | if (op) { \ Branch (199:13): [True: 4.18M, False: 967k]
| 200 | 4.18M | int vret = visit(_PyObject_CAST(op), arg); \ Line | Count | Source | 109 | 4.18M | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.18M | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 201 | 4.18M | if (vret) \ Branch (201:17): [True: 0, False: 4.18M]
| 202 | 4.18M | return vret; \ | 203 | 4.18M | } \ | 204 | 5.15M | } while (0) Branch (204:14): [Folded - Ignored]
|
|
784 | 5.15M | return 0; |
785 | 5.15M | } |
786 | | |
787 | | static int |
788 | | ast_clear(AST_object *self) |
789 | 5 | { |
790 | 5 | Py_CLEAR(self->dict); Line | Count | Source | 587 | 5 | do { \ | 588 | 5 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 5 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3, False: 2]
| 590 | 3 | (op) = NULL; \ | 591 | 3 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3 | } \ | 593 | 5 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
791 | 5 | return 0; |
792 | 5 | } |
793 | | |
794 | | static int |
795 | | ast_type_init(PyObject *self, PyObject *args, PyObject *kw) |
796 | 3.25k | { |
797 | 3.25k | struct ast_state *state = get_ast_state(); |
798 | 3.25k | if (state == NULL) { Branch (798:9): [True: 0, False: 3.25k]
|
799 | 0 | return -1; |
800 | 0 | } |
801 | | |
802 | 3.25k | Py_ssize_t i, numfields = 0; |
803 | 3.25k | int res = -1; |
804 | 3.25k | PyObject *key, *value, *fields; |
805 | 3.25k | if (_PyObject_LookupAttr((PyObject*)Py_TYPE(self), state->_fields, &fields) < 0) {Line | Count | Source | 138 | 3.25k | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 3.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (805:9): [True: 0, False: 3.25k]
|
806 | 0 | goto cleanup; |
807 | 0 | } |
808 | 3.25k | if (fields) { Branch (808:9): [True: 3.25k, False: 0]
|
809 | 3.25k | numfields = PySequence_Size(fields); |
810 | 3.25k | if (numfields == -1) { Branch (810:13): [True: 0, False: 3.25k]
|
811 | 0 | goto cleanup; |
812 | 0 | } |
813 | 3.25k | } |
814 | | |
815 | 3.25k | res = 0; /* if no error occurs, this stays 0 to the end */ |
816 | 3.25k | if (numfields < PyTuple_GET_SIZE(args)) {Line | Count | Source | 26 | 3.25k | #define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (816:9): [True: 5, False: 3.25k]
|
817 | 5 | PyErr_Format(PyExc_TypeError, "%.400s constructor takes at most " |
818 | 5 | "%zd positional argument%s", |
819 | 5 | _PyType_Name(Py_TYPE(self)), Line | Count | Source | 138 | 5 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
820 | 5 | numfields, numfields == 1 ? "" : "s"); Branch (820:33): [True: 0, False: 5]
|
821 | 5 | res = -1; |
822 | 5 | goto cleanup; |
823 | 5 | } |
824 | 4.95k | for (i = 0; i < PyTuple_GET_SIZE(args); i++) {Line | Count | Source | 26 | 4.95k | #define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.95k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.95k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (824:17): [True: 1.70k, False: 3.25k]
|
825 | | /* cannot be reached when fields is NULL */ |
826 | 1.70k | PyObject *name = PySequence_GetItem(fields, i); |
827 | 1.70k | if (!name) { Branch (827:13): [True: 0, False: 1.70k]
|
828 | 0 | res = -1; |
829 | 0 | goto cleanup; |
830 | 0 | } |
831 | 1.70k | res = PyObject_SetAttr(self, name, PyTuple_GET_ITEM(args, i)); Line | Count | Source | 28 | 1.70k | #define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[(index)]) Line | Count | Source | 18 | 1.70k | (assert(PyTuple_Check(op)), _Py_CAST(PyTupleObject*, (op))) Line | Count | Source | 71 | 1.70k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
832 | 1.70k | Py_DECREF(name); Line | Count | Source | 548 | 1.70k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.70k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.70k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
833 | 1.70k | if (res < 0) { Branch (833:13): [True: 0, False: 1.70k]
|
834 | 0 | goto cleanup; |
835 | 0 | } |
836 | 1.70k | } |
837 | 3.25k | if (kw) { Branch (837:9): [True: 237, False: 3.01k]
|
838 | 237 | i = 0; /* needed by PyDict_Next */ |
839 | 558 | while (PyDict_Next(kw, &i, &key, &value)) { Branch (839:16): [True: 322, False: 236]
|
840 | 322 | int contains = PySequence_Contains(fields, key); |
841 | 322 | if (contains == -1) { Branch (841:17): [True: 0, False: 322]
|
842 | 0 | res = -1; |
843 | 0 | goto cleanup; |
844 | 322 | } else if (contains == 1) { Branch (844:24): [True: 218, False: 104]
|
845 | 218 | Py_ssize_t p = PySequence_Index(fields, key); |
846 | 218 | if (p == -1) { Branch (846:21): [True: 0, False: 218]
|
847 | 0 | res = -1; |
848 | 0 | goto cleanup; |
849 | 0 | } |
850 | 218 | if (p < PyTuple_GET_SIZE(args)) {Line | Count | Source | 26 | 218 | #define PyTuple_GET_SIZE(op) PyTuple_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 218 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 218 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (850:21): [True: 1, False: 217]
|
851 | 1 | PyErr_Format(PyExc_TypeError, |
852 | 1 | "%.400s got multiple values for argument '%U'", |
853 | 1 | Py_TYPE(self)->tp_name, key); Line | Count | Source | 138 | 1 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
854 | 1 | res = -1; |
855 | 1 | goto cleanup; |
856 | 1 | } |
857 | 218 | } |
858 | 321 | res = PyObject_SetAttr(self, key, value); |
859 | 321 | if (res < 0) { Branch (859:17): [True: 0, False: 321]
|
860 | 0 | goto cleanup; |
861 | 0 | } |
862 | 321 | } |
863 | 237 | } |
864 | 3.25k | cleanup: |
865 | 3.25k | Py_XDECREF(fields); Line | Count | Source | 613 | 3.25k | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
866 | 3.25k | return res; |
867 | 3.25k | } |
868 | | |
869 | | /* Pickling support */ |
870 | | static PyObject * |
871 | | ast_type_reduce(PyObject *self, PyObject *unused) |
872 | 1.85k | { |
873 | 1.85k | struct ast_state *state = get_ast_state(); |
874 | 1.85k | if (state == NULL) { Branch (874:9): [True: 0, False: 1.85k]
|
875 | 0 | return NULL; |
876 | 0 | } |
877 | | |
878 | 1.85k | PyObject *dict; |
879 | 1.85k | if (_PyObject_LookupAttr(self, state->__dict__, &dict) < 0) { Branch (879:9): [True: 0, False: 1.85k]
|
880 | 0 | return NULL; |
881 | 0 | } |
882 | 1.85k | if (dict) { Branch (882:9): [True: 1.85k, False: 0]
|
883 | 1.85k | return Py_BuildValue("O()N", Py_TYPE(self), dict);Line | Count | Source | 138 | 1.85k | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 1.85k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.85k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
884 | 1.85k | } |
885 | 0 | return Py_BuildValue("O()", Py_TYPE(self));Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
886 | 1.85k | } |
887 | | |
888 | | static PyMemberDef ast_type_members[] = { |
889 | | {"__dictoffset__", T_PYSSIZET, offsetof(AST_object, dict), READONLY}, |
890 | | {NULL} /* Sentinel */ |
891 | | }; |
892 | | |
893 | | static PyMethodDef ast_type_methods[] = { |
894 | | {"__reduce__", ast_type_reduce, METH_NOARGS, NULL}, |
895 | | {NULL} |
896 | | }; |
897 | | |
898 | | static PyGetSetDef ast_type_getsets[] = { |
899 | | {"__dict__", PyObject_GenericGetDict, PyObject_GenericSetDict}, |
900 | | {NULL} |
901 | | }; |
902 | | |
903 | | static PyType_Slot AST_type_slots[] = { |
904 | | {Py_tp_dealloc, ast_dealloc}, |
905 | | {Py_tp_getattro, PyObject_GenericGetAttr}, |
906 | | {Py_tp_setattro, PyObject_GenericSetAttr}, |
907 | | {Py_tp_traverse, ast_traverse}, |
908 | | {Py_tp_clear, ast_clear}, |
909 | | {Py_tp_members, ast_type_members}, |
910 | | {Py_tp_methods, ast_type_methods}, |
911 | | {Py_tp_getset, ast_type_getsets}, |
912 | | {Py_tp_init, ast_type_init}, |
913 | | {Py_tp_alloc, PyType_GenericAlloc}, |
914 | | {Py_tp_new, PyType_GenericNew}, |
915 | | {Py_tp_free, PyObject_GC_Del}, |
916 | | {0, 0}, |
917 | | }; |
918 | | |
919 | | static PyType_Spec AST_type_spec = { |
920 | | "ast.AST", |
921 | | sizeof(AST_object), |
922 | | 0, |
923 | | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, |
924 | | AST_type_slots |
925 | | }; |
926 | | |
927 | | static PyObject * |
928 | | make_type(struct ast_state *state, const char *type, PyObject* base, |
929 | | const char* const* fields, int num_fields, const char *doc) |
930 | 2.24k | { |
931 | 2.24k | PyObject *fnames, *result; |
932 | 2.24k | int i; |
933 | 2.24k | fnames = PyTuple_New(num_fields); |
934 | 2.24k | if (!fnames) return NULL; Branch (934:9): [True: 0, False: 2.24k]
|
935 | 5.62k | for (i = 0; i < num_fields; i++) { Branch (935:17): [True: 3.38k, False: 2.24k]
|
936 | 3.38k | PyObject *field = PyUnicode_InternFromString(fields[i]); |
937 | 3.38k | if (!field) { Branch (937:13): [True: 0, False: 3.38k]
|
938 | 0 | Py_DECREF(fnames); Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
939 | 0 | return NULL; |
940 | 0 | } |
941 | 3.38k | PyTuple_SET_ITEM(fnames, i, field); Line | Count | Source | 37 | 3.38k | PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 3.38k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.38k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 3.38k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.38k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
942 | 3.38k | } |
943 | 2.24k | result = PyObject_CallFunction((PyObject*)&PyType_Type, "s(O){OOOOOOOs}", |
944 | 2.24k | type, base, |
945 | 2.24k | state->_fields, fnames, |
946 | 2.24k | state->__match_args__, fnames, |
947 | 2.24k | state->__module__, |
948 | 2.24k | state->ast, |
949 | 2.24k | state->__doc__, doc); |
950 | 2.24k | Py_DECREF(fnames); Line | Count | Source | 548 | 2.24k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
951 | 2.24k | return result; |
952 | 2.24k | } |
953 | | |
954 | | static int |
955 | | add_attributes(struct ast_state *state, PyObject *type, const char * const *attrs, int num_fields) |
956 | 342 | { |
957 | 342 | int i, result; |
958 | 342 | PyObject *s, *l = PyTuple_New(num_fields); |
959 | 342 | if (!l) Branch (959:9): [True: 0, False: 342]
|
960 | 0 | return 0; |
961 | 874 | for (i = 0; i < num_fields; i++) { Branch (961:17): [True: 532, False: 342]
|
962 | 532 | s = PyUnicode_InternFromString(attrs[i]); |
963 | 532 | if (!s) { Branch (963:13): [True: 0, False: 532]
|
964 | 0 | Py_DECREF(l); Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
965 | 0 | return 0; |
966 | 0 | } |
967 | 532 | PyTuple_SET_ITEM(l, i, s); Line | Count | Source | 37 | 532 | PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 532 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 532 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 532 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 532 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
968 | 532 | } |
969 | 342 | result = PyObject_SetAttr(type, state->_attributes, l) >= 0; |
970 | 342 | Py_DECREF(l); Line | Count | Source | 548 | 342 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 342 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 342 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
971 | 342 | return result; |
972 | 342 | } |
973 | | |
974 | | /* Conversion AST -> Python */ |
975 | | |
976 | | static PyObject* ast2obj_list(struct ast_state *state, asdl_seq *seq, PyObject* (*func)(struct ast_state *state, void*)) |
977 | 470k | { |
978 | 470k | Py_ssize_t i, n = asdl_seq_LEN(seq); Line | Count | Source | 83 | 470k | #define asdl_seq_LEN(S) _Py_RVALUE(((S) == NULL ? 0 : (S)->size)) Line | Count | Source | 153 | 940k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) Branch (153:37): [True: 141k, False: 328k]
|
|
|
979 | 470k | PyObject *result = PyList_New(n); |
980 | 470k | PyObject *value; |
981 | 470k | if (!result) Branch (981:9): [True: 0, False: 470k]
|
982 | 0 | return NULL; |
983 | 915k | for (i = 0; i < n; i++) { Branch (983:17): [True: 445k, False: 470k]
|
984 | 445k | value = func(state, asdl_seq_GET_UNTYPED(seq, i)); Line | Count | Source | 81 | 445k | #define asdl_seq_GET_UNTYPED(S, I) _Py_RVALUE((S)->elements[(I)]) Line | Count | Source | 153 | 445k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
985 | 445k | if (!value) { Branch (985:13): [True: 0, False: 445k]
|
986 | 0 | Py_DECREF(result); Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
987 | 0 | return NULL; |
988 | 0 | } |
989 | 445k | PyList_SET_ITEM(result, i, value); Line | Count | Source | 47 | 445k | PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 445k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 445k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 445k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 445k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
990 | 445k | } |
991 | 470k | return result; |
992 | 470k | } |
993 | | |
994 | | static PyObject* ast2obj_object(struct ast_state *Py_UNUSED(state), void *o) |
995 | 754k | { |
996 | 754k | if (!o) Branch (996:9): [True: 228k, False: 526k]
|
997 | 228k | o = Py_None; Line | Count | Source | 654 | 228k | #define Py_None (&_Py_NoneStruct) |
|
998 | 754k | Py_INCREF((PyObject*)o); Line | Count | Source | 512 | 754k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 754k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 754k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
999 | 754k | return (PyObject*)o; |
1000 | 754k | } |
1001 | 114k | #define ast2obj_constant ast2obj_object |
1002 | 417k | #define ast2obj_identifier ast2obj_object |
1003 | 222k | #define ast2obj_string ast2obj_object |
1004 | | |
1005 | | static PyObject* ast2obj_int(struct ast_state *Py_UNUSED(state), long b) |
1006 | 3.24M | { |
1007 | 3.24M | return PyLong_FromLong(b); |
1008 | 3.24M | } |
1009 | | |
1010 | | /* Conversion Python -> AST */ |
1011 | | |
1012 | | static int obj2ast_object(struct ast_state *Py_UNUSED(state), PyObject* obj, PyObject** out, PyArena* arena) |
1013 | 183k | { |
1014 | 183k | if (obj == Py_None) Line | Count | Source | 654 | 183k | #define Py_None (&_Py_NoneStruct) |
Branch (1014:9): [True: 0, False: 183k]
|
1015 | 0 | obj = NULL; |
1016 | 183k | if (obj) { Branch (1016:9): [True: 183k, False: 0]
|
1017 | 183k | if (_PyArena_AddPyObject(arena, obj) < 0) { Branch (1017:13): [True: 0, False: 183k]
|
1018 | 0 | *out = NULL; |
1019 | 0 | return -1; |
1020 | 0 | } |
1021 | 183k | Py_INCREF(obj); Line | Count | Source | 512 | 183k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 183k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 183k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
1022 | 183k | } |
1023 | 183k | *out = obj; |
1024 | 183k | return 0; |
1025 | 183k | } |
1026 | | |
1027 | | static int obj2ast_constant(struct ast_state *Py_UNUSED(state), PyObject* obj, PyObject** out, PyArena* arena) |
1028 | 46.6k | { |
1029 | 46.6k | if (_PyArena_AddPyObject(arena, obj) < 0) { Branch (1029:9): [True: 0, False: 46.6k]
|
1030 | 0 | *out = NULL; |
1031 | 0 | return -1; |
1032 | 0 | } |
1033 | 46.6k | Py_INCREF(obj); Line | Count | Source | 512 | 46.6k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 46.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 46.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
1034 | 46.6k | *out = obj; |
1035 | 46.6k | return 0; |
1036 | 46.6k | } |
1037 | | |
1038 | | static int obj2ast_identifier(struct ast_state *state, PyObject* obj, PyObject** out, PyArena* arena) |
1039 | 183k | { |
1040 | 183k | if (!PyUnicode_CheckExact(obj) && obj != Py_None) {Line | Count | Source | 116 | 183k | #define PyUnicode_CheckExact(op) Py_IS_TYPE((op), &PyUnicode_Type) Line | Count | Source | 155 | 367k | # define Py_IS_TYPE(ob, type) Py_IS_TYPE(_PyObject_CAST(ob), (type)) Line | Count | Source | 109 | 183k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 183k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
| if (!PyUnicode_CheckExact(obj) && obj != Py_None) {Line | Count | Source | 654 | 1 | #define Py_None (&_Py_NoneStruct) |
Branch (1040:9): [True: 1, False: 183k]
Branch (1040:39): [True: 1, False: 0]
|
1041 | 1 | PyErr_SetString(PyExc_TypeError, "AST identifier must be of type str"); |
1042 | 1 | return 1; |
1043 | 1 | } |
1044 | 183k | return obj2ast_object(state, obj, out, arena); |
1045 | 183k | } |
1046 | | |
1047 | | static int obj2ast_string(struct ast_state *state, PyObject* obj, PyObject** out, PyArena* arena) |
1048 | 0 | { |
1049 | 0 | if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {Line | Count | Source | 116 | 0 | #define PyUnicode_CheckExact(op) Py_IS_TYPE((op), &PyUnicode_Type) Line | Count | Source | 155 | 0 | # define Py_IS_TYPE(ob, type) Py_IS_TYPE(_PyObject_CAST(ob), (type)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
| if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) {Line | Count | Source | 32 | 0 | #define PyBytes_CheckExact(op) Py_IS_TYPE((op), &PyBytes_Type) Line | Count | Source | 155 | 0 | # define Py_IS_TYPE(ob, type) Py_IS_TYPE(_PyObject_CAST(ob), (type)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
Branch (1049:9): [True: 0, False: 0]
Branch (1049:39): [True: 0, False: 0]
|
1050 | 0 | PyErr_SetString(PyExc_TypeError, "AST string must be of type str"); |
1051 | 0 | return 1; |
1052 | 0 | } |
1053 | 0 | return obj2ast_object(state, obj, out, arena); |
1054 | 0 | } |
1055 | | |
1056 | | static int obj2ast_int(struct ast_state* Py_UNUSED(state), PyObject* obj, int* out, PyArena* arena) |
1057 | 1.43M | { |
1058 | 1.43M | int i; |
1059 | 1.43M | if (!PyLong_Check(obj)) {Line | Count | Source | 13 | 1.43M | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS) Line | Count | Source | 782 | 1.43M | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (1059:9): [True: 1, False: 1.43M]
|
1060 | 1 | PyErr_Format(PyExc_ValueError, "invalid integer value: %R", obj); |
1061 | 1 | return 1; |
1062 | 1 | } |
1063 | | |
1064 | 1.43M | i = _PyLong_AsInt(obj); |
1065 | 1.43M | if (i == -1 && PyErr_Occurred()) Branch (1065:9): [True: 410, False: 1.43M]
Branch (1065:20): [True: 0, False: 410]
|
1066 | 0 | return 1; |
1067 | 1.43M | *out = i; |
1068 | 1.43M | return 0; |
1069 | 1.43M | } |
1070 | | |
1071 | | static int add_ast_fields(struct ast_state *state) |
1072 | 19 | { |
1073 | 19 | PyObject *empty_tuple; |
1074 | 19 | empty_tuple = PyTuple_New(0); |
1075 | 19 | if (!empty_tuple || Branch (1075:9): [True: 0, False: 19]
|
1076 | 19 | PyObject_SetAttrString(state->AST_type, "_fields", empty_tuple) < 0 || Branch (1076:9): [True: 0, False: 19]
|
1077 | 19 | PyObject_SetAttrString(state->AST_type, "__match_args__", empty_tuple) < 0 || Branch (1077:9): [True: 0, False: 19]
|
1078 | 19 | PyObject_SetAttrString(state->AST_type, "_attributes", empty_tuple) < 0) { Branch (1078:9): [True: 0, False: 19]
|
1079 | 0 | Py_XDECREF(empty_tuple); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
1080 | 0 | return -1; |
1081 | 0 | } |
1082 | 19 | Py_DECREF(empty_tuple); Line | Count | Source | 548 | 19 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
1083 | 19 | return 0; |
1084 | 19 | } |
1085 | | |
1086 | | |
1087 | | |
1088 | | static int |
1089 | | init_types(struct ast_state *state) |
1090 | 32.5k | { |
1091 | | // init_types() must not be called after _PyAST_Fini() |
1092 | | // has been called |
1093 | 32.5k | assert(state->initialized >= 0); |
1094 | | |
1095 | 32.5k | if (state->initialized) { Branch (1095:9): [True: 32.5k, False: 19]
|
1096 | 32.5k | return 1; |
1097 | 32.5k | } |
1098 | 19 | if (init_identifiers(state) < 0) { Branch (1098:9): [True: 0, False: 19]
|
1099 | 0 | return 0; |
1100 | 0 | } |
1101 | 19 | state->AST_type = PyType_FromSpec(&AST_type_spec); |
1102 | 19 | if (!state->AST_type) { Branch (1102:9): [True: 0, False: 19]
|
1103 | 0 | return 0; |
1104 | 0 | } |
1105 | 19 | if (add_ast_fields(state) < 0) { Branch (1105:9): [True: 0, False: 19]
|
1106 | 0 | return 0; |
1107 | 0 | } |
1108 | 19 | state->mod_type = make_type(state, "mod", state->AST_type, NULL, 0, |
1109 | 19 | "mod = Module(stmt* body, type_ignore* type_ignores)\n" |
1110 | 19 | " | Interactive(stmt* body)\n" |
1111 | 19 | " | Expression(expr body)\n" |
1112 | 19 | " | FunctionType(expr* argtypes, expr returns)"); |
1113 | 19 | if (!state->mod_type) return 0; Branch (1113:9): [True: 0, False: 19]
|
1114 | 19 | if (!add_attributes(state, state->mod_type, NULL, 0)) return 0; Branch (1114:9): [True: 0, False: 19]
|
1115 | 19 | state->Module_type = make_type(state, "Module", state->mod_type, |
1116 | 19 | Module_fields, 2, |
1117 | 19 | "Module(stmt* body, type_ignore* type_ignores)"); |
1118 | 19 | if (!state->Module_type) return 0; Branch (1118:9): [True: 0, False: 19]
|
1119 | 19 | state->Interactive_type = make_type(state, "Interactive", state->mod_type, |
1120 | 19 | Interactive_fields, 1, |
1121 | 19 | "Interactive(stmt* body)"); |
1122 | 19 | if (!state->Interactive_type) return 0; Branch (1122:9): [True: 0, False: 19]
|
1123 | 19 | state->Expression_type = make_type(state, "Expression", state->mod_type, |
1124 | 19 | Expression_fields, 1, |
1125 | 19 | "Expression(expr body)"); |
1126 | 19 | if (!state->Expression_type) return 0; Branch (1126:9): [True: 0, False: 19]
|
1127 | 19 | state->FunctionType_type = make_type(state, "FunctionType", |
1128 | 19 | state->mod_type, FunctionType_fields, |
1129 | 19 | 2, |
1130 | 19 | "FunctionType(expr* argtypes, expr returns)"); |
1131 | 19 | if (!state->FunctionType_type) return 0; Branch (1131:9): [True: 0, False: 19]
|
1132 | 19 | state->stmt_type = make_type(state, "stmt", state->AST_type, NULL, 0, |
1133 | 19 | "stmt = FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)\n" |
1134 | 19 | " | AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)\n" |
1135 | 19 | " | ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list)\n" |
1136 | 19 | " | Return(expr? value)\n" |
1137 | 19 | " | Delete(expr* targets)\n" |
1138 | 19 | " | Assign(expr* targets, expr value, string? type_comment)\n" |
1139 | 19 | " | AugAssign(expr target, operator op, expr value)\n" |
1140 | 19 | " | AnnAssign(expr target, expr annotation, expr? value, int simple)\n" |
1141 | 19 | " | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" |
1142 | 19 | " | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)\n" |
1143 | 19 | " | While(expr test, stmt* body, stmt* orelse)\n" |
1144 | 19 | " | If(expr test, stmt* body, stmt* orelse)\n" |
1145 | 19 | " | With(withitem* items, stmt* body, string? type_comment)\n" |
1146 | 19 | " | AsyncWith(withitem* items, stmt* body, string? type_comment)\n" |
1147 | 19 | " | Match(expr subject, match_case* cases)\n" |
1148 | 19 | " | Raise(expr? exc, expr? cause)\n" |
1149 | 19 | " | Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" |
1150 | 19 | " | TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)\n" |
1151 | 19 | " | Assert(expr test, expr? msg)\n" |
1152 | 19 | " | Import(alias* names)\n" |
1153 | 19 | " | ImportFrom(identifier? module, alias* names, int? level)\n" |
1154 | 19 | " | Global(identifier* names)\n" |
1155 | 19 | " | Nonlocal(identifier* names)\n" |
1156 | 19 | " | Expr(expr value)\n" |
1157 | 19 | " | Pass\n" |
1158 | 19 | " | Break\n" |
1159 | 19 | " | Continue"); |
1160 | 19 | if (!state->stmt_type) return 0; Branch (1160:9): [True: 0, False: 19]
|
1161 | 19 | if (!add_attributes(state, state->stmt_type, stmt_attributes, 4)) return 0; Branch (1161:9): [True: 0, False: 19]
|
1162 | 19 | if (PyObject_SetAttr(state->stmt_type, state->end_lineno, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1162:9): [True: 0, False: 19]
|
1163 | 0 | return 0; |
1164 | 19 | if (PyObject_SetAttr(state->stmt_type, state->end_col_offset, Py_None) == Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1164:9): [True: 0, False: 19]
|
1165 | 19 | -1) |
1166 | 0 | return 0; |
1167 | 19 | state->FunctionDef_type = make_type(state, "FunctionDef", state->stmt_type, |
1168 | 19 | FunctionDef_fields, 6, |
1169 | 19 | "FunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)"); |
1170 | 19 | if (!state->FunctionDef_type) return 0; Branch (1170:9): [True: 0, False: 19]
|
1171 | 19 | if (PyObject_SetAttr(state->FunctionDef_type, state->returns, Py_None) == Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1171:9): [True: 0, False: 19]
|
1172 | 19 | -1) |
1173 | 0 | return 0; |
1174 | 19 | if (PyObject_SetAttr(state->FunctionDef_type, state->type_comment, Py_None) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1174:9): [True: 0, False: 19]
|
1175 | 19 | == -1) |
1176 | 0 | return 0; |
1177 | 19 | state->AsyncFunctionDef_type = make_type(state, "AsyncFunctionDef", |
1178 | 19 | state->stmt_type, |
1179 | 19 | AsyncFunctionDef_fields, 6, |
1180 | 19 | "AsyncFunctionDef(identifier name, arguments args, stmt* body, expr* decorator_list, expr? returns, string? type_comment)"); |
1181 | 19 | if (!state->AsyncFunctionDef_type) return 0; Branch (1181:9): [True: 0, False: 19]
|
1182 | 19 | if (PyObject_SetAttr(state->AsyncFunctionDef_type, state->returns, Py_None) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1182:9): [True: 0, False: 19]
|
1183 | 19 | == -1) |
1184 | 0 | return 0; |
1185 | 19 | if (PyObject_SetAttr(state->AsyncFunctionDef_type, state->type_comment, Branch (1185:9): [True: 0, False: 19]
|
1186 | 19 | Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
|
1187 | 0 | return 0; |
1188 | 19 | state->ClassDef_type = make_type(state, "ClassDef", state->stmt_type, |
1189 | 19 | ClassDef_fields, 5, |
1190 | 19 | "ClassDef(identifier name, expr* bases, keyword* keywords, stmt* body, expr* decorator_list)"); |
1191 | 19 | if (!state->ClassDef_type) return 0; Branch (1191:9): [True: 0, False: 19]
|
1192 | 19 | state->Return_type = make_type(state, "Return", state->stmt_type, |
1193 | 19 | Return_fields, 1, |
1194 | 19 | "Return(expr? value)"); |
1195 | 19 | if (!state->Return_type) return 0; Branch (1195:9): [True: 0, False: 19]
|
1196 | 19 | if (PyObject_SetAttr(state->Return_type, state->value, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1196:9): [True: 0, False: 19]
|
1197 | 0 | return 0; |
1198 | 19 | state->Delete_type = make_type(state, "Delete", state->stmt_type, |
1199 | 19 | Delete_fields, 1, |
1200 | 19 | "Delete(expr* targets)"); |
1201 | 19 | if (!state->Delete_type) return 0; Branch (1201:9): [True: 0, False: 19]
|
1202 | 19 | state->Assign_type = make_type(state, "Assign", state->stmt_type, |
1203 | 19 | Assign_fields, 3, |
1204 | 19 | "Assign(expr* targets, expr value, string? type_comment)"); |
1205 | 19 | if (!state->Assign_type) return 0; Branch (1205:9): [True: 0, False: 19]
|
1206 | 19 | if (PyObject_SetAttr(state->Assign_type, state->type_comment, Py_None) == Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1206:9): [True: 0, False: 19]
|
1207 | 19 | -1) |
1208 | 0 | return 0; |
1209 | 19 | state->AugAssign_type = make_type(state, "AugAssign", state->stmt_type, |
1210 | 19 | AugAssign_fields, 3, |
1211 | 19 | "AugAssign(expr target, operator op, expr value)"); |
1212 | 19 | if (!state->AugAssign_type) return 0; Branch (1212:9): [True: 0, False: 19]
|
1213 | 19 | state->AnnAssign_type = make_type(state, "AnnAssign", state->stmt_type, |
1214 | 19 | AnnAssign_fields, 4, |
1215 | 19 | "AnnAssign(expr target, expr annotation, expr? value, int simple)"); |
1216 | 19 | if (!state->AnnAssign_type) return 0; Branch (1216:9): [True: 0, False: 19]
|
1217 | 19 | if (PyObject_SetAttr(state->AnnAssign_type, state->value, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1217:9): [True: 0, False: 19]
|
1218 | 0 | return 0; |
1219 | 19 | state->For_type = make_type(state, "For", state->stmt_type, For_fields, 5, |
1220 | 19 | "For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)"); |
1221 | 19 | if (!state->For_type) return 0; Branch (1221:9): [True: 0, False: 19]
|
1222 | 19 | if (PyObject_SetAttr(state->For_type, state->type_comment, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1222:9): [True: 0, False: 19]
|
1223 | 0 | return 0; |
1224 | 19 | state->AsyncFor_type = make_type(state, "AsyncFor", state->stmt_type, |
1225 | 19 | AsyncFor_fields, 5, |
1226 | 19 | "AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)"); |
1227 | 19 | if (!state->AsyncFor_type) return 0; Branch (1227:9): [True: 0, False: 19]
|
1228 | 19 | if (PyObject_SetAttr(state->AsyncFor_type, state->type_comment, Py_None) == Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1228:9): [True: 0, False: 19]
|
1229 | 19 | -1) |
1230 | 0 | return 0; |
1231 | 19 | state->While_type = make_type(state, "While", state->stmt_type, |
1232 | 19 | While_fields, 3, |
1233 | 19 | "While(expr test, stmt* body, stmt* orelse)"); |
1234 | 19 | if (!state->While_type) return 0; Branch (1234:9): [True: 0, False: 19]
|
1235 | 19 | state->If_type = make_type(state, "If", state->stmt_type, If_fields, 3, |
1236 | 19 | "If(expr test, stmt* body, stmt* orelse)"); |
1237 | 19 | if (!state->If_type) return 0; Branch (1237:9): [True: 0, False: 19]
|
1238 | 19 | state->With_type = make_type(state, "With", state->stmt_type, With_fields, |
1239 | 19 | 3, |
1240 | 19 | "With(withitem* items, stmt* body, string? type_comment)"); |
1241 | 19 | if (!state->With_type) return 0; Branch (1241:9): [True: 0, False: 19]
|
1242 | 19 | if (PyObject_SetAttr(state->With_type, state->type_comment, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1242:9): [True: 0, False: 19]
|
1243 | 0 | return 0; |
1244 | 19 | state->AsyncWith_type = make_type(state, "AsyncWith", state->stmt_type, |
1245 | 19 | AsyncWith_fields, 3, |
1246 | 19 | "AsyncWith(withitem* items, stmt* body, string? type_comment)"); |
1247 | 19 | if (!state->AsyncWith_type) return 0; Branch (1247:9): [True: 0, False: 19]
|
1248 | 19 | if (PyObject_SetAttr(state->AsyncWith_type, state->type_comment, Py_None) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1248:9): [True: 0, False: 19]
|
1249 | 19 | == -1) |
1250 | 0 | return 0; |
1251 | 19 | state->Match_type = make_type(state, "Match", state->stmt_type, |
1252 | 19 | Match_fields, 2, |
1253 | 19 | "Match(expr subject, match_case* cases)"); |
1254 | 19 | if (!state->Match_type) return 0; Branch (1254:9): [True: 0, False: 19]
|
1255 | 19 | state->Raise_type = make_type(state, "Raise", state->stmt_type, |
1256 | 19 | Raise_fields, 2, |
1257 | 19 | "Raise(expr? exc, expr? cause)"); |
1258 | 19 | if (!state->Raise_type) return 0; Branch (1258:9): [True: 0, False: 19]
|
1259 | 19 | if (PyObject_SetAttr(state->Raise_type, state->exc, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1259:9): [True: 0, False: 19]
|
1260 | 0 | return 0; |
1261 | 19 | if (PyObject_SetAttr(state->Raise_type, state->cause, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1261:9): [True: 0, False: 19]
|
1262 | 0 | return 0; |
1263 | 19 | state->Try_type = make_type(state, "Try", state->stmt_type, Try_fields, 4, |
1264 | 19 | "Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)"); |
1265 | 19 | if (!state->Try_type) return 0; Branch (1265:9): [True: 0, False: 19]
|
1266 | 19 | state->TryStar_type = make_type(state, "TryStar", state->stmt_type, |
1267 | 19 | TryStar_fields, 4, |
1268 | 19 | "TryStar(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)"); |
1269 | 19 | if (!state->TryStar_type) return 0; Branch (1269:9): [True: 0, False: 19]
|
1270 | 19 | state->Assert_type = make_type(state, "Assert", state->stmt_type, |
1271 | 19 | Assert_fields, 2, |
1272 | 19 | "Assert(expr test, expr? msg)"); |
1273 | 19 | if (!state->Assert_type) return 0; Branch (1273:9): [True: 0, False: 19]
|
1274 | 19 | if (PyObject_SetAttr(state->Assert_type, state->msg, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1274:9): [True: 0, False: 19]
|
1275 | 0 | return 0; |
1276 | 19 | state->Import_type = make_type(state, "Import", state->stmt_type, |
1277 | 19 | Import_fields, 1, |
1278 | 19 | "Import(alias* names)"); |
1279 | 19 | if (!state->Import_type) return 0; Branch (1279:9): [True: 0, False: 19]
|
1280 | 19 | state->ImportFrom_type = make_type(state, "ImportFrom", state->stmt_type, |
1281 | 19 | ImportFrom_fields, 3, |
1282 | 19 | "ImportFrom(identifier? module, alias* names, int? level)"); |
1283 | 19 | if (!state->ImportFrom_type) return 0; Branch (1283:9): [True: 0, False: 19]
|
1284 | 19 | if (PyObject_SetAttr(state->ImportFrom_type, state->module, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1284:9): [True: 0, False: 19]
|
1285 | 0 | return 0; |
1286 | 19 | if (PyObject_SetAttr(state->ImportFrom_type, state->level, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1286:9): [True: 0, False: 19]
|
1287 | 0 | return 0; |
1288 | 19 | state->Global_type = make_type(state, "Global", state->stmt_type, |
1289 | 19 | Global_fields, 1, |
1290 | 19 | "Global(identifier* names)"); |
1291 | 19 | if (!state->Global_type) return 0; Branch (1291:9): [True: 0, False: 19]
|
1292 | 19 | state->Nonlocal_type = make_type(state, "Nonlocal", state->stmt_type, |
1293 | 19 | Nonlocal_fields, 1, |
1294 | 19 | "Nonlocal(identifier* names)"); |
1295 | 19 | if (!state->Nonlocal_type) return 0; Branch (1295:9): [True: 0, False: 19]
|
1296 | 19 | state->Expr_type = make_type(state, "Expr", state->stmt_type, Expr_fields, |
1297 | 19 | 1, |
1298 | 19 | "Expr(expr value)"); |
1299 | 19 | if (!state->Expr_type) return 0; Branch (1299:9): [True: 0, False: 19]
|
1300 | 19 | state->Pass_type = make_type(state, "Pass", state->stmt_type, NULL, 0, |
1301 | 19 | "Pass"); |
1302 | 19 | if (!state->Pass_type) return 0; Branch (1302:9): [True: 0, False: 19]
|
1303 | 19 | state->Break_type = make_type(state, "Break", state->stmt_type, NULL, 0, |
1304 | 19 | "Break"); |
1305 | 19 | if (!state->Break_type) return 0; Branch (1305:9): [True: 0, False: 19]
|
1306 | 19 | state->Continue_type = make_type(state, "Continue", state->stmt_type, NULL, |
1307 | 19 | 0, |
1308 | 19 | "Continue"); |
1309 | 19 | if (!state->Continue_type) return 0; Branch (1309:9): [True: 0, False: 19]
|
1310 | 19 | state->expr_type = make_type(state, "expr", state->AST_type, NULL, 0, |
1311 | 19 | "expr = BoolOp(boolop op, expr* values)\n" |
1312 | 19 | " | NamedExpr(expr target, expr value)\n" |
1313 | 19 | " | BinOp(expr left, operator op, expr right)\n" |
1314 | 19 | " | UnaryOp(unaryop op, expr operand)\n" |
1315 | 19 | " | Lambda(arguments args, expr body)\n" |
1316 | 19 | " | IfExp(expr test, expr body, expr orelse)\n" |
1317 | 19 | " | Dict(expr* keys, expr* values)\n" |
1318 | 19 | " | Set(expr* elts)\n" |
1319 | 19 | " | ListComp(expr elt, comprehension* generators)\n" |
1320 | 19 | " | SetComp(expr elt, comprehension* generators)\n" |
1321 | 19 | " | DictComp(expr key, expr value, comprehension* generators)\n" |
1322 | 19 | " | GeneratorExp(expr elt, comprehension* generators)\n" |
1323 | 19 | " | Await(expr value)\n" |
1324 | 19 | " | Yield(expr? value)\n" |
1325 | 19 | " | YieldFrom(expr value)\n" |
1326 | 19 | " | Compare(expr left, cmpop* ops, expr* comparators)\n" |
1327 | 19 | " | Call(expr func, expr* args, keyword* keywords)\n" |
1328 | 19 | " | FormattedValue(expr value, int conversion, expr? format_spec)\n" |
1329 | 19 | " | JoinedStr(expr* values)\n" |
1330 | 19 | " | Constant(constant value, string? kind)\n" |
1331 | 19 | " | Attribute(expr value, identifier attr, expr_context ctx)\n" |
1332 | 19 | " | Subscript(expr value, expr slice, expr_context ctx)\n" |
1333 | 19 | " | Starred(expr value, expr_context ctx)\n" |
1334 | 19 | " | Name(identifier id, expr_context ctx)\n" |
1335 | 19 | " | List(expr* elts, expr_context ctx)\n" |
1336 | 19 | " | Tuple(expr* elts, expr_context ctx)\n" |
1337 | 19 | " | Slice(expr? lower, expr? upper, expr? step)"); |
1338 | 19 | if (!state->expr_type) return 0; Branch (1338:9): [True: 0, False: 19]
|
1339 | 19 | if (!add_attributes(state, state->expr_type, expr_attributes, 4)) return 0; Branch (1339:9): [True: 0, False: 19]
|
1340 | 19 | if (PyObject_SetAttr(state->expr_type, state->end_lineno, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1340:9): [True: 0, False: 19]
|
1341 | 0 | return 0; |
1342 | 19 | if (PyObject_SetAttr(state->expr_type, state->end_col_offset, Py_None) == Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1342:9): [True: 0, False: 19]
|
1343 | 19 | -1) |
1344 | 0 | return 0; |
1345 | 19 | state->BoolOp_type = make_type(state, "BoolOp", state->expr_type, |
1346 | 19 | BoolOp_fields, 2, |
1347 | 19 | "BoolOp(boolop op, expr* values)"); |
1348 | 19 | if (!state->BoolOp_type) return 0; Branch (1348:9): [True: 0, False: 19]
|
1349 | 19 | state->NamedExpr_type = make_type(state, "NamedExpr", state->expr_type, |
1350 | 19 | NamedExpr_fields, 2, |
1351 | 19 | "NamedExpr(expr target, expr value)"); |
1352 | 19 | if (!state->NamedExpr_type) return 0; Branch (1352:9): [True: 0, False: 19]
|
1353 | 19 | state->BinOp_type = make_type(state, "BinOp", state->expr_type, |
1354 | 19 | BinOp_fields, 3, |
1355 | 19 | "BinOp(expr left, operator op, expr right)"); |
1356 | 19 | if (!state->BinOp_type) return 0; Branch (1356:9): [True: 0, False: 19]
|
1357 | 19 | state->UnaryOp_type = make_type(state, "UnaryOp", state->expr_type, |
1358 | 19 | UnaryOp_fields, 2, |
1359 | 19 | "UnaryOp(unaryop op, expr operand)"); |
1360 | 19 | if (!state->UnaryOp_type) return 0; Branch (1360:9): [True: 0, False: 19]
|
1361 | 19 | state->Lambda_type = make_type(state, "Lambda", state->expr_type, |
1362 | 19 | Lambda_fields, 2, |
1363 | 19 | "Lambda(arguments args, expr body)"); |
1364 | 19 | if (!state->Lambda_type) return 0; Branch (1364:9): [True: 0, False: 19]
|
1365 | 19 | state->IfExp_type = make_type(state, "IfExp", state->expr_type, |
1366 | 19 | IfExp_fields, 3, |
1367 | 19 | "IfExp(expr test, expr body, expr orelse)"); |
1368 | 19 | if (!state->IfExp_type) return 0; Branch (1368:9): [True: 0, False: 19]
|
1369 | 19 | state->Dict_type = make_type(state, "Dict", state->expr_type, Dict_fields, |
1370 | 19 | 2, |
1371 | 19 | "Dict(expr* keys, expr* values)"); |
1372 | 19 | if (!state->Dict_type) return 0; Branch (1372:9): [True: 0, False: 19]
|
1373 | 19 | state->Set_type = make_type(state, "Set", state->expr_type, Set_fields, 1, |
1374 | 19 | "Set(expr* elts)"); |
1375 | 19 | if (!state->Set_type) return 0; Branch (1375:9): [True: 0, False: 19]
|
1376 | 19 | state->ListComp_type = make_type(state, "ListComp", state->expr_type, |
1377 | 19 | ListComp_fields, 2, |
1378 | 19 | "ListComp(expr elt, comprehension* generators)"); |
1379 | 19 | if (!state->ListComp_type) return 0; Branch (1379:9): [True: 0, False: 19]
|
1380 | 19 | state->SetComp_type = make_type(state, "SetComp", state->expr_type, |
1381 | 19 | SetComp_fields, 2, |
1382 | 19 | "SetComp(expr elt, comprehension* generators)"); |
1383 | 19 | if (!state->SetComp_type) return 0; Branch (1383:9): [True: 0, False: 19]
|
1384 | 19 | state->DictComp_type = make_type(state, "DictComp", state->expr_type, |
1385 | 19 | DictComp_fields, 3, |
1386 | 19 | "DictComp(expr key, expr value, comprehension* generators)"); |
1387 | 19 | if (!state->DictComp_type) return 0; Branch (1387:9): [True: 0, False: 19]
|
1388 | 19 | state->GeneratorExp_type = make_type(state, "GeneratorExp", |
1389 | 19 | state->expr_type, GeneratorExp_fields, |
1390 | 19 | 2, |
1391 | 19 | "GeneratorExp(expr elt, comprehension* generators)"); |
1392 | 19 | if (!state->GeneratorExp_type) return 0; Branch (1392:9): [True: 0, False: 19]
|
1393 | 19 | state->Await_type = make_type(state, "Await", state->expr_type, |
1394 | 19 | Await_fields, 1, |
1395 | 19 | "Await(expr value)"); |
1396 | 19 | if (!state->Await_type) return 0; Branch (1396:9): [True: 0, False: 19]
|
1397 | 19 | state->Yield_type = make_type(state, "Yield", state->expr_type, |
1398 | 19 | Yield_fields, 1, |
1399 | 19 | "Yield(expr? value)"); |
1400 | 19 | if (!state->Yield_type) return 0; Branch (1400:9): [True: 0, False: 19]
|
1401 | 19 | if (PyObject_SetAttr(state->Yield_type, state->value, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1401:9): [True: 0, False: 19]
|
1402 | 0 | return 0; |
1403 | 19 | state->YieldFrom_type = make_type(state, "YieldFrom", state->expr_type, |
1404 | 19 | YieldFrom_fields, 1, |
1405 | 19 | "YieldFrom(expr value)"); |
1406 | 19 | if (!state->YieldFrom_type) return 0; Branch (1406:9): [True: 0, False: 19]
|
1407 | 19 | state->Compare_type = make_type(state, "Compare", state->expr_type, |
1408 | 19 | Compare_fields, 3, |
1409 | 19 | "Compare(expr left, cmpop* ops, expr* comparators)"); |
1410 | 19 | if (!state->Compare_type) return 0; Branch (1410:9): [True: 0, False: 19]
|
1411 | 19 | state->Call_type = make_type(state, "Call", state->expr_type, Call_fields, |
1412 | 19 | 3, |
1413 | 19 | "Call(expr func, expr* args, keyword* keywords)"); |
1414 | 19 | if (!state->Call_type) return 0; Branch (1414:9): [True: 0, False: 19]
|
1415 | 19 | state->FormattedValue_type = make_type(state, "FormattedValue", |
1416 | 19 | state->expr_type, |
1417 | 19 | FormattedValue_fields, 3, |
1418 | 19 | "FormattedValue(expr value, int conversion, expr? format_spec)"); |
1419 | 19 | if (!state->FormattedValue_type) return 0; Branch (1419:9): [True: 0, False: 19]
|
1420 | 19 | if (PyObject_SetAttr(state->FormattedValue_type, state->format_spec, Branch (1420:9): [True: 0, False: 19]
|
1421 | 19 | Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
|
1422 | 0 | return 0; |
1423 | 19 | state->JoinedStr_type = make_type(state, "JoinedStr", state->expr_type, |
1424 | 19 | JoinedStr_fields, 1, |
1425 | 19 | "JoinedStr(expr* values)"); |
1426 | 19 | if (!state->JoinedStr_type) return 0; Branch (1426:9): [True: 0, False: 19]
|
1427 | 19 | state->Constant_type = make_type(state, "Constant", state->expr_type, |
1428 | 19 | Constant_fields, 2, |
1429 | 19 | "Constant(constant value, string? kind)"); |
1430 | 19 | if (!state->Constant_type) return 0; Branch (1430:9): [True: 0, False: 19]
|
1431 | 19 | if (PyObject_SetAttr(state->Constant_type, state->kind, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1431:9): [True: 0, False: 19]
|
1432 | 0 | return 0; |
1433 | 19 | state->Attribute_type = make_type(state, "Attribute", state->expr_type, |
1434 | 19 | Attribute_fields, 3, |
1435 | 19 | "Attribute(expr value, identifier attr, expr_context ctx)"); |
1436 | 19 | if (!state->Attribute_type) return 0; Branch (1436:9): [True: 0, False: 19]
|
1437 | 19 | state->Subscript_type = make_type(state, "Subscript", state->expr_type, |
1438 | 19 | Subscript_fields, 3, |
1439 | 19 | "Subscript(expr value, expr slice, expr_context ctx)"); |
1440 | 19 | if (!state->Subscript_type) return 0; Branch (1440:9): [True: 0, False: 19]
|
1441 | 19 | state->Starred_type = make_type(state, "Starred", state->expr_type, |
1442 | 19 | Starred_fields, 2, |
1443 | 19 | "Starred(expr value, expr_context ctx)"); |
1444 | 19 | if (!state->Starred_type) return 0; Branch (1444:9): [True: 0, False: 19]
|
1445 | 19 | state->Name_type = make_type(state, "Name", state->expr_type, Name_fields, |
1446 | 19 | 2, |
1447 | 19 | "Name(identifier id, expr_context ctx)"); |
1448 | 19 | if (!state->Name_type) return 0; Branch (1448:9): [True: 0, False: 19]
|
1449 | 19 | state->List_type = make_type(state, "List", state->expr_type, List_fields, |
1450 | 19 | 2, |
1451 | 19 | "List(expr* elts, expr_context ctx)"); |
1452 | 19 | if (!state->List_type) return 0; Branch (1452:9): [True: 0, False: 19]
|
1453 | 19 | state->Tuple_type = make_type(state, "Tuple", state->expr_type, |
1454 | 19 | Tuple_fields, 2, |
1455 | 19 | "Tuple(expr* elts, expr_context ctx)"); |
1456 | 19 | if (!state->Tuple_type) return 0; Branch (1456:9): [True: 0, False: 19]
|
1457 | 19 | state->Slice_type = make_type(state, "Slice", state->expr_type, |
1458 | 19 | Slice_fields, 3, |
1459 | 19 | "Slice(expr? lower, expr? upper, expr? step)"); |
1460 | 19 | if (!state->Slice_type) return 0; Branch (1460:9): [True: 0, False: 19]
|
1461 | 19 | if (PyObject_SetAttr(state->Slice_type, state->lower, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1461:9): [True: 0, False: 19]
|
1462 | 0 | return 0; |
1463 | 19 | if (PyObject_SetAttr(state->Slice_type, state->upper, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1463:9): [True: 0, False: 19]
|
1464 | 0 | return 0; |
1465 | 19 | if (PyObject_SetAttr(state->Slice_type, state->step, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1465:9): [True: 0, False: 19]
|
1466 | 0 | return 0; |
1467 | 19 | state->expr_context_type = make_type(state, "expr_context", |
1468 | 19 | state->AST_type, NULL, 0, |
1469 | 19 | "expr_context = Load | Store | Del"); |
1470 | 19 | if (!state->expr_context_type) return 0; Branch (1470:9): [True: 0, False: 19]
|
1471 | 19 | if (!add_attributes(state, state->expr_context_type, NULL, 0)) return 0; Branch (1471:9): [True: 0, False: 19]
|
1472 | 19 | state->Load_type = make_type(state, "Load", state->expr_context_type, NULL, |
1473 | 19 | 0, |
1474 | 19 | "Load"); |
1475 | 19 | if (!state->Load_type) return 0; Branch (1475:9): [True: 0, False: 19]
|
1476 | 19 | state->Load_singleton = PyType_GenericNew((PyTypeObject *)state->Load_type, |
1477 | 19 | NULL, NULL); |
1478 | 19 | if (!state->Load_singleton) return 0; Branch (1478:9): [True: 0, False: 19]
|
1479 | 19 | state->Store_type = make_type(state, "Store", state->expr_context_type, |
1480 | 19 | NULL, 0, |
1481 | 19 | "Store"); |
1482 | 19 | if (!state->Store_type) return 0; Branch (1482:9): [True: 0, False: 19]
|
1483 | 19 | state->Store_singleton = PyType_GenericNew((PyTypeObject |
1484 | 19 | *)state->Store_type, NULL, NULL); |
1485 | 19 | if (!state->Store_singleton) return 0; Branch (1485:9): [True: 0, False: 19]
|
1486 | 19 | state->Del_type = make_type(state, "Del", state->expr_context_type, NULL, 0, |
1487 | 19 | "Del"); |
1488 | 19 | if (!state->Del_type) return 0; Branch (1488:9): [True: 0, False: 19]
|
1489 | 19 | state->Del_singleton = PyType_GenericNew((PyTypeObject *)state->Del_type, |
1490 | 19 | NULL, NULL); |
1491 | 19 | if (!state->Del_singleton) return 0; Branch (1491:9): [True: 0, False: 19]
|
1492 | 19 | state->boolop_type = make_type(state, "boolop", state->AST_type, NULL, 0, |
1493 | 19 | "boolop = And | Or"); |
1494 | 19 | if (!state->boolop_type) return 0; Branch (1494:9): [True: 0, False: 19]
|
1495 | 19 | if (!add_attributes(state, state->boolop_type, NULL, 0)) return 0; Branch (1495:9): [True: 0, False: 19]
|
1496 | 19 | state->And_type = make_type(state, "And", state->boolop_type, NULL, 0, |
1497 | 19 | "And"); |
1498 | 19 | if (!state->And_type) return 0; Branch (1498:9): [True: 0, False: 19]
|
1499 | 19 | state->And_singleton = PyType_GenericNew((PyTypeObject *)state->And_type, |
1500 | 19 | NULL, NULL); |
1501 | 19 | if (!state->And_singleton) return 0; Branch (1501:9): [True: 0, False: 19]
|
1502 | 19 | state->Or_type = make_type(state, "Or", state->boolop_type, NULL, 0, |
1503 | 19 | "Or"); |
1504 | 19 | if (!state->Or_type) return 0; Branch (1504:9): [True: 0, False: 19]
|
1505 | 19 | state->Or_singleton = PyType_GenericNew((PyTypeObject *)state->Or_type, |
1506 | 19 | NULL, NULL); |
1507 | 19 | if (!state->Or_singleton) return 0; Branch (1507:9): [True: 0, False: 19]
|
1508 | 19 | state->operator_type = make_type(state, "operator", state->AST_type, NULL, |
1509 | 19 | 0, |
1510 | 19 | "operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift | RShift | BitOr | BitXor | BitAnd | FloorDiv"); |
1511 | 19 | if (!state->operator_type) return 0; Branch (1511:9): [True: 0, False: 19]
|
1512 | 19 | if (!add_attributes(state, state->operator_type, NULL, 0)) return 0; Branch (1512:9): [True: 0, False: 19]
|
1513 | 19 | state->Add_type = make_type(state, "Add", state->operator_type, NULL, 0, |
1514 | 19 | "Add"); |
1515 | 19 | if (!state->Add_type) return 0; Branch (1515:9): [True: 0, False: 19]
|
1516 | 19 | state->Add_singleton = PyType_GenericNew((PyTypeObject *)state->Add_type, |
1517 | 19 | NULL, NULL); |
1518 | 19 | if (!state->Add_singleton) return 0; Branch (1518:9): [True: 0, False: 19]
|
1519 | 19 | state->Sub_type = make_type(state, "Sub", state->operator_type, NULL, 0, |
1520 | 19 | "Sub"); |
1521 | 19 | if (!state->Sub_type) return 0; Branch (1521:9): [True: 0, False: 19]
|
1522 | 19 | state->Sub_singleton = PyType_GenericNew((PyTypeObject *)state->Sub_type, |
1523 | 19 | NULL, NULL); |
1524 | 19 | if (!state->Sub_singleton) return 0; Branch (1524:9): [True: 0, False: 19]
|
1525 | 19 | state->Mult_type = make_type(state, "Mult", state->operator_type, NULL, 0, |
1526 | 19 | "Mult"); |
1527 | 19 | if (!state->Mult_type) return 0; Branch (1527:9): [True: 0, False: 19]
|
1528 | 19 | state->Mult_singleton = PyType_GenericNew((PyTypeObject *)state->Mult_type, |
1529 | 19 | NULL, NULL); |
1530 | 19 | if (!state->Mult_singleton) return 0; Branch (1530:9): [True: 0, False: 19]
|
1531 | 19 | state->MatMult_type = make_type(state, "MatMult", state->operator_type, |
1532 | 19 | NULL, 0, |
1533 | 19 | "MatMult"); |
1534 | 19 | if (!state->MatMult_type) return 0; Branch (1534:9): [True: 0, False: 19]
|
1535 | 19 | state->MatMult_singleton = PyType_GenericNew((PyTypeObject |
1536 | 19 | *)state->MatMult_type, NULL, |
1537 | 19 | NULL); |
1538 | 19 | if (!state->MatMult_singleton) return 0; Branch (1538:9): [True: 0, False: 19]
|
1539 | 19 | state->Div_type = make_type(state, "Div", state->operator_type, NULL, 0, |
1540 | 19 | "Div"); |
1541 | 19 | if (!state->Div_type) return 0; Branch (1541:9): [True: 0, False: 19]
|
1542 | 19 | state->Div_singleton = PyType_GenericNew((PyTypeObject *)state->Div_type, |
1543 | 19 | NULL, NULL); |
1544 | 19 | if (!state->Div_singleton) return 0; Branch (1544:9): [True: 0, False: 19]
|
1545 | 19 | state->Mod_type = make_type(state, "Mod", state->operator_type, NULL, 0, |
1546 | 19 | "Mod"); |
1547 | 19 | if (!state->Mod_type) return 0; Branch (1547:9): [True: 0, False: 19]
|
1548 | 19 | state->Mod_singleton = PyType_GenericNew((PyTypeObject *)state->Mod_type, |
1549 | 19 | NULL, NULL); |
1550 | 19 | if (!state->Mod_singleton) return 0; Branch (1550:9): [True: 0, False: 19]
|
1551 | 19 | state->Pow_type = make_type(state, "Pow", state->operator_type, NULL, 0, |
1552 | 19 | "Pow"); |
1553 | 19 | if (!state->Pow_type) return 0; Branch (1553:9): [True: 0, False: 19]
|
1554 | 19 | state->Pow_singleton = PyType_GenericNew((PyTypeObject *)state->Pow_type, |
1555 | 19 | NULL, NULL); |
1556 | 19 | if (!state->Pow_singleton) return 0; Branch (1556:9): [True: 0, False: 19]
|
1557 | 19 | state->LShift_type = make_type(state, "LShift", state->operator_type, NULL, |
1558 | 19 | 0, |
1559 | 19 | "LShift"); |
1560 | 19 | if (!state->LShift_type) return 0; Branch (1560:9): [True: 0, False: 19]
|
1561 | 19 | state->LShift_singleton = PyType_GenericNew((PyTypeObject |
1562 | 19 | *)state->LShift_type, NULL, |
1563 | 19 | NULL); |
1564 | 19 | if (!state->LShift_singleton) return 0; Branch (1564:9): [True: 0, False: 19]
|
1565 | 19 | state->RShift_type = make_type(state, "RShift", state->operator_type, NULL, |
1566 | 19 | 0, |
1567 | 19 | "RShift"); |
1568 | 19 | if (!state->RShift_type) return 0; Branch (1568:9): [True: 0, False: 19]
|
1569 | 19 | state->RShift_singleton = PyType_GenericNew((PyTypeObject |
1570 | 19 | *)state->RShift_type, NULL, |
1571 | 19 | NULL); |
1572 | 19 | if (!state->RShift_singleton) return 0; Branch (1572:9): [True: 0, False: 19]
|
1573 | 19 | state->BitOr_type = make_type(state, "BitOr", state->operator_type, NULL, 0, |
1574 | 19 | "BitOr"); |
1575 | 19 | if (!state->BitOr_type) return 0; Branch (1575:9): [True: 0, False: 19]
|
1576 | 19 | state->BitOr_singleton = PyType_GenericNew((PyTypeObject |
1577 | 19 | *)state->BitOr_type, NULL, NULL); |
1578 | 19 | if (!state->BitOr_singleton) return 0; Branch (1578:9): [True: 0, False: 19]
|
1579 | 19 | state->BitXor_type = make_type(state, "BitXor", state->operator_type, NULL, |
1580 | 19 | 0, |
1581 | 19 | "BitXor"); |
1582 | 19 | if (!state->BitXor_type) return 0; Branch (1582:9): [True: 0, False: 19]
|
1583 | 19 | state->BitXor_singleton = PyType_GenericNew((PyTypeObject |
1584 | 19 | *)state->BitXor_type, NULL, |
1585 | 19 | NULL); |
1586 | 19 | if (!state->BitXor_singleton) return 0; Branch (1586:9): [True: 0, False: 19]
|
1587 | 19 | state->BitAnd_type = make_type(state, "BitAnd", state->operator_type, NULL, |
1588 | 19 | 0, |
1589 | 19 | "BitAnd"); |
1590 | 19 | if (!state->BitAnd_type) return 0; Branch (1590:9): [True: 0, False: 19]
|
1591 | 19 | state->BitAnd_singleton = PyType_GenericNew((PyTypeObject |
1592 | 19 | *)state->BitAnd_type, NULL, |
1593 | 19 | NULL); |
1594 | 19 | if (!state->BitAnd_singleton) return 0; Branch (1594:9): [True: 0, False: 19]
|
1595 | 19 | state->FloorDiv_type = make_type(state, "FloorDiv", state->operator_type, |
1596 | 19 | NULL, 0, |
1597 | 19 | "FloorDiv"); |
1598 | 19 | if (!state->FloorDiv_type) return 0; Branch (1598:9): [True: 0, False: 19]
|
1599 | 19 | state->FloorDiv_singleton = PyType_GenericNew((PyTypeObject |
1600 | 19 | *)state->FloorDiv_type, NULL, |
1601 | 19 | NULL); |
1602 | 19 | if (!state->FloorDiv_singleton) return 0; Branch (1602:9): [True: 0, False: 19]
|
1603 | 19 | state->unaryop_type = make_type(state, "unaryop", state->AST_type, NULL, 0, |
1604 | 19 | "unaryop = Invert | Not | UAdd | USub"); |
1605 | 19 | if (!state->unaryop_type) return 0; Branch (1605:9): [True: 0, False: 19]
|
1606 | 19 | if (!add_attributes(state, state->unaryop_type, NULL, 0)) return 0; Branch (1606:9): [True: 0, False: 19]
|
1607 | 19 | state->Invert_type = make_type(state, "Invert", state->unaryop_type, NULL, |
1608 | 19 | 0, |
1609 | 19 | "Invert"); |
1610 | 19 | if (!state->Invert_type) return 0; Branch (1610:9): [True: 0, False: 19]
|
1611 | 19 | state->Invert_singleton = PyType_GenericNew((PyTypeObject |
1612 | 19 | *)state->Invert_type, NULL, |
1613 | 19 | NULL); |
1614 | 19 | if (!state->Invert_singleton) return 0; Branch (1614:9): [True: 0, False: 19]
|
1615 | 19 | state->Not_type = make_type(state, "Not", state->unaryop_type, NULL, 0, |
1616 | 19 | "Not"); |
1617 | 19 | if (!state->Not_type) return 0; Branch (1617:9): [True: 0, False: 19]
|
1618 | 19 | state->Not_singleton = PyType_GenericNew((PyTypeObject *)state->Not_type, |
1619 | 19 | NULL, NULL); |
1620 | 19 | if (!state->Not_singleton) return 0; Branch (1620:9): [True: 0, False: 19]
|
1621 | 19 | state->UAdd_type = make_type(state, "UAdd", state->unaryop_type, NULL, 0, |
1622 | 19 | "UAdd"); |
1623 | 19 | if (!state->UAdd_type) return 0; Branch (1623:9): [True: 0, False: 19]
|
1624 | 19 | state->UAdd_singleton = PyType_GenericNew((PyTypeObject *)state->UAdd_type, |
1625 | 19 | NULL, NULL); |
1626 | 19 | if (!state->UAdd_singleton) return 0; Branch (1626:9): [True: 0, False: 19]
|
1627 | 19 | state->USub_type = make_type(state, "USub", state->unaryop_type, NULL, 0, |
1628 | 19 | "USub"); |
1629 | 19 | if (!state->USub_type) return 0; Branch (1629:9): [True: 0, False: 19]
|
1630 | 19 | state->USub_singleton = PyType_GenericNew((PyTypeObject *)state->USub_type, |
1631 | 19 | NULL, NULL); |
1632 | 19 | if (!state->USub_singleton) return 0; Branch (1632:9): [True: 0, False: 19]
|
1633 | 19 | state->cmpop_type = make_type(state, "cmpop", state->AST_type, NULL, 0, |
1634 | 19 | "cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn"); |
1635 | 19 | if (!state->cmpop_type) return 0; Branch (1635:9): [True: 0, False: 19]
|
1636 | 19 | if (!add_attributes(state, state->cmpop_type, NULL, 0)) return 0; Branch (1636:9): [True: 0, False: 19]
|
1637 | 19 | state->Eq_type = make_type(state, "Eq", state->cmpop_type, NULL, 0, |
1638 | 19 | "Eq"); |
1639 | 19 | if (!state->Eq_type) return 0; Branch (1639:9): [True: 0, False: 19]
|
1640 | 19 | state->Eq_singleton = PyType_GenericNew((PyTypeObject *)state->Eq_type, |
1641 | 19 | NULL, NULL); |
1642 | 19 | if (!state->Eq_singleton) return 0; Branch (1642:9): [True: 0, False: 19]
|
1643 | 19 | state->NotEq_type = make_type(state, "NotEq", state->cmpop_type, NULL, 0, |
1644 | 19 | "NotEq"); |
1645 | 19 | if (!state->NotEq_type) return 0; Branch (1645:9): [True: 0, False: 19]
|
1646 | 19 | state->NotEq_singleton = PyType_GenericNew((PyTypeObject |
1647 | 19 | *)state->NotEq_type, NULL, NULL); |
1648 | 19 | if (!state->NotEq_singleton) return 0; Branch (1648:9): [True: 0, False: 19]
|
1649 | 19 | state->Lt_type = make_type(state, "Lt", state->cmpop_type, NULL, 0, |
1650 | 19 | "Lt"); |
1651 | 19 | if (!state->Lt_type) return 0; Branch (1651:9): [True: 0, False: 19]
|
1652 | 19 | state->Lt_singleton = PyType_GenericNew((PyTypeObject *)state->Lt_type, |
1653 | 19 | NULL, NULL); |
1654 | 19 | if (!state->Lt_singleton) return 0; Branch (1654:9): [True: 0, False: 19]
|
1655 | 19 | state->LtE_type = make_type(state, "LtE", state->cmpop_type, NULL, 0, |
1656 | 19 | "LtE"); |
1657 | 19 | if (!state->LtE_type) return 0; Branch (1657:9): [True: 0, False: 19]
|
1658 | 19 | state->LtE_singleton = PyType_GenericNew((PyTypeObject *)state->LtE_type, |
1659 | 19 | NULL, NULL); |
1660 | 19 | if (!state->LtE_singleton) return 0; Branch (1660:9): [True: 0, False: 19]
|
1661 | 19 | state->Gt_type = make_type(state, "Gt", state->cmpop_type, NULL, 0, |
1662 | 19 | "Gt"); |
1663 | 19 | if (!state->Gt_type) return 0; Branch (1663:9): [True: 0, False: 19]
|
1664 | 19 | state->Gt_singleton = PyType_GenericNew((PyTypeObject *)state->Gt_type, |
1665 | 19 | NULL, NULL); |
1666 | 19 | if (!state->Gt_singleton) return 0; Branch (1666:9): [True: 0, False: 19]
|
1667 | 19 | state->GtE_type = make_type(state, "GtE", state->cmpop_type, NULL, 0, |
1668 | 19 | "GtE"); |
1669 | 19 | if (!state->GtE_type) return 0; Branch (1669:9): [True: 0, False: 19]
|
1670 | 19 | state->GtE_singleton = PyType_GenericNew((PyTypeObject *)state->GtE_type, |
1671 | 19 | NULL, NULL); |
1672 | 19 | if (!state->GtE_singleton) return 0; Branch (1672:9): [True: 0, False: 19]
|
1673 | 19 | state->Is_type = make_type(state, "Is", state->cmpop_type, NULL, 0, |
1674 | 19 | "Is"); |
1675 | 19 | if (!state->Is_type) return 0; Branch (1675:9): [True: 0, False: 19]
|
1676 | 19 | state->Is_singleton = PyType_GenericNew((PyTypeObject *)state->Is_type, |
1677 | 19 | NULL, NULL); |
1678 | 19 | if (!state->Is_singleton) return 0; Branch (1678:9): [True: 0, False: 19]
|
1679 | 19 | state->IsNot_type = make_type(state, "IsNot", state->cmpop_type, NULL, 0, |
1680 | 19 | "IsNot"); |
1681 | 19 | if (!state->IsNot_type) return 0; Branch (1681:9): [True: 0, False: 19]
|
1682 | 19 | state->IsNot_singleton = PyType_GenericNew((PyTypeObject |
1683 | 19 | *)state->IsNot_type, NULL, NULL); |
1684 | 19 | if (!state->IsNot_singleton) return 0; Branch (1684:9): [True: 0, False: 19]
|
1685 | 19 | state->In_type = make_type(state, "In", state->cmpop_type, NULL, 0, |
1686 | 19 | "In"); |
1687 | 19 | if (!state->In_type) return 0; Branch (1687:9): [True: 0, False: 19]
|
1688 | 19 | state->In_singleton = PyType_GenericNew((PyTypeObject *)state->In_type, |
1689 | 19 | NULL, NULL); |
1690 | 19 | if (!state->In_singleton) return 0; Branch (1690:9): [True: 0, False: 19]
|
1691 | 19 | state->NotIn_type = make_type(state, "NotIn", state->cmpop_type, NULL, 0, |
1692 | 19 | "NotIn"); |
1693 | 19 | if (!state->NotIn_type) return 0; Branch (1693:9): [True: 0, False: 19]
|
1694 | 19 | state->NotIn_singleton = PyType_GenericNew((PyTypeObject |
1695 | 19 | *)state->NotIn_type, NULL, NULL); |
1696 | 19 | if (!state->NotIn_singleton) return 0; Branch (1696:9): [True: 0, False: 19]
|
1697 | 19 | state->comprehension_type = make_type(state, "comprehension", |
1698 | 19 | state->AST_type, |
1699 | 19 | comprehension_fields, 4, |
1700 | 19 | "comprehension(expr target, expr iter, expr* ifs, int is_async)"); |
1701 | 19 | if (!state->comprehension_type) return 0; Branch (1701:9): [True: 0, False: 19]
|
1702 | 19 | if (!add_attributes(state, state->comprehension_type, NULL, 0)) return 0; Branch (1702:9): [True: 0, False: 19]
|
1703 | 19 | state->excepthandler_type = make_type(state, "excepthandler", |
1704 | 19 | state->AST_type, NULL, 0, |
1705 | 19 | "excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)"); |
1706 | 19 | if (!state->excepthandler_type) return 0; Branch (1706:9): [True: 0, False: 19]
|
1707 | 19 | if (!add_attributes(state, state->excepthandler_type, Branch (1707:9): [True: 0, False: 19]
|
1708 | 19 | excepthandler_attributes, 4)) return 0; |
1709 | 19 | if (PyObject_SetAttr(state->excepthandler_type, state->end_lineno, Py_None) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1709:9): [True: 0, False: 19]
|
1710 | 19 | == -1) |
1711 | 0 | return 0; |
1712 | 19 | if (PyObject_SetAttr(state->excepthandler_type, state->end_col_offset, Branch (1712:9): [True: 0, False: 19]
|
1713 | 19 | Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
|
1714 | 0 | return 0; |
1715 | 19 | state->ExceptHandler_type = make_type(state, "ExceptHandler", |
1716 | 19 | state->excepthandler_type, |
1717 | 19 | ExceptHandler_fields, 3, |
1718 | 19 | "ExceptHandler(expr? type, identifier? name, stmt* body)"); |
1719 | 19 | if (!state->ExceptHandler_type) return 0; Branch (1719:9): [True: 0, False: 19]
|
1720 | 19 | if (PyObject_SetAttr(state->ExceptHandler_type, state->type, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1720:9): [True: 0, False: 19]
|
1721 | 0 | return 0; |
1722 | 19 | if (PyObject_SetAttr(state->ExceptHandler_type, state->name, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1722:9): [True: 0, False: 19]
|
1723 | 0 | return 0; |
1724 | 19 | state->arguments_type = make_type(state, "arguments", state->AST_type, |
1725 | 19 | arguments_fields, 7, |
1726 | 19 | "arguments(arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults, arg? kwarg, expr* defaults)"); |
1727 | 19 | if (!state->arguments_type) return 0; Branch (1727:9): [True: 0, False: 19]
|
1728 | 19 | if (!add_attributes(state, state->arguments_type, NULL, 0)) return 0; Branch (1728:9): [True: 0, False: 19]
|
1729 | 19 | if (PyObject_SetAttr(state->arguments_type, state->vararg, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1729:9): [True: 0, False: 19]
|
1730 | 0 | return 0; |
1731 | 19 | if (PyObject_SetAttr(state->arguments_type, state->kwarg, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1731:9): [True: 0, False: 19]
|
1732 | 0 | return 0; |
1733 | 19 | state->arg_type = make_type(state, "arg", state->AST_type, arg_fields, 3, |
1734 | 19 | "arg(identifier arg, expr? annotation, string? type_comment)"); |
1735 | 19 | if (!state->arg_type) return 0; Branch (1735:9): [True: 0, False: 19]
|
1736 | 19 | if (!add_attributes(state, state->arg_type, arg_attributes, 4)) return 0; Branch (1736:9): [True: 0, False: 19]
|
1737 | 19 | if (PyObject_SetAttr(state->arg_type, state->annotation, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1737:9): [True: 0, False: 19]
|
1738 | 0 | return 0; |
1739 | 19 | if (PyObject_SetAttr(state->arg_type, state->type_comment, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1739:9): [True: 0, False: 19]
|
1740 | 0 | return 0; |
1741 | 19 | if (PyObject_SetAttr(state->arg_type, state->end_lineno, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1741:9): [True: 0, False: 19]
|
1742 | 0 | return 0; |
1743 | 19 | if (PyObject_SetAttr(state->arg_type, state->end_col_offset, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1743:9): [True: 0, False: 19]
|
1744 | 0 | return 0; |
1745 | 19 | state->keyword_type = make_type(state, "keyword", state->AST_type, |
1746 | 19 | keyword_fields, 2, |
1747 | 19 | "keyword(identifier? arg, expr value)"); |
1748 | 19 | if (!state->keyword_type) return 0; Branch (1748:9): [True: 0, False: 19]
|
1749 | 19 | if (!add_attributes(state, state->keyword_type, keyword_attributes, 4)) Branch (1749:9): [True: 0, False: 19]
|
1750 | 0 | return 0; |
1751 | 19 | if (PyObject_SetAttr(state->keyword_type, state->arg, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1751:9): [True: 0, False: 19]
|
1752 | 0 | return 0; |
1753 | 19 | if (PyObject_SetAttr(state->keyword_type, state->end_lineno, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1753:9): [True: 0, False: 19]
|
1754 | 0 | return 0; |
1755 | 19 | if (PyObject_SetAttr(state->keyword_type, state->end_col_offset, Py_None) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1755:9): [True: 0, False: 19]
|
1756 | 19 | == -1) |
1757 | 0 | return 0; |
1758 | 19 | state->alias_type = make_type(state, "alias", state->AST_type, |
1759 | 19 | alias_fields, 2, |
1760 | 19 | "alias(identifier name, identifier? asname)"); |
1761 | 19 | if (!state->alias_type) return 0; Branch (1761:9): [True: 0, False: 19]
|
1762 | 19 | if (!add_attributes(state, state->alias_type, alias_attributes, 4)) return Branch (1762:9): [True: 0, False: 19]
|
1763 | 0 | 0; |
1764 | 19 | if (PyObject_SetAttr(state->alias_type, state->asname, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1764:9): [True: 0, False: 19]
|
1765 | 0 | return 0; |
1766 | 19 | if (PyObject_SetAttr(state->alias_type, state->end_lineno, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1766:9): [True: 0, False: 19]
|
1767 | 0 | return 0; |
1768 | 19 | if (PyObject_SetAttr(state->alias_type, state->end_col_offset, Py_None) == Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1768:9): [True: 0, False: 19]
|
1769 | 19 | -1) |
1770 | 0 | return 0; |
1771 | 19 | state->withitem_type = make_type(state, "withitem", state->AST_type, |
1772 | 19 | withitem_fields, 2, |
1773 | 19 | "withitem(expr context_expr, expr? optional_vars)"); |
1774 | 19 | if (!state->withitem_type) return 0; Branch (1774:9): [True: 0, False: 19]
|
1775 | 19 | if (!add_attributes(state, state->withitem_type, NULL, 0)) return 0; Branch (1775:9): [True: 0, False: 19]
|
1776 | 19 | if (PyObject_SetAttr(state->withitem_type, state->optional_vars, Py_None) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1776:9): [True: 0, False: 19]
|
1777 | 19 | == -1) |
1778 | 0 | return 0; |
1779 | 19 | state->match_case_type = make_type(state, "match_case", state->AST_type, |
1780 | 19 | match_case_fields, 3, |
1781 | 19 | "match_case(pattern pattern, expr? guard, stmt* body)"); |
1782 | 19 | if (!state->match_case_type) return 0; Branch (1782:9): [True: 0, False: 19]
|
1783 | 19 | if (!add_attributes(state, state->match_case_type, NULL, 0)) return 0; Branch (1783:9): [True: 0, False: 19]
|
1784 | 19 | if (PyObject_SetAttr(state->match_case_type, state->guard, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1784:9): [True: 0, False: 19]
|
1785 | 0 | return 0; |
1786 | 19 | state->pattern_type = make_type(state, "pattern", state->AST_type, NULL, 0, |
1787 | 19 | "pattern = MatchValue(expr value)\n" |
1788 | 19 | " | MatchSingleton(constant value)\n" |
1789 | 19 | " | MatchSequence(pattern* patterns)\n" |
1790 | 19 | " | MatchMapping(expr* keys, pattern* patterns, identifier? rest)\n" |
1791 | 19 | " | MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)\n" |
1792 | 19 | " | MatchStar(identifier? name)\n" |
1793 | 19 | " | MatchAs(pattern? pattern, identifier? name)\n" |
1794 | 19 | " | MatchOr(pattern* patterns)"); |
1795 | 19 | if (!state->pattern_type) return 0; Branch (1795:9): [True: 0, False: 19]
|
1796 | 19 | if (!add_attributes(state, state->pattern_type, pattern_attributes, 4)) Branch (1796:9): [True: 0, False: 19]
|
1797 | 0 | return 0; |
1798 | 19 | state->MatchValue_type = make_type(state, "MatchValue", |
1799 | 19 | state->pattern_type, MatchValue_fields, |
1800 | 19 | 1, |
1801 | 19 | "MatchValue(expr value)"); |
1802 | 19 | if (!state->MatchValue_type) return 0; Branch (1802:9): [True: 0, False: 19]
|
1803 | 19 | state->MatchSingleton_type = make_type(state, "MatchSingleton", |
1804 | 19 | state->pattern_type, |
1805 | 19 | MatchSingleton_fields, 1, |
1806 | 19 | "MatchSingleton(constant value)"); |
1807 | 19 | if (!state->MatchSingleton_type) return 0; Branch (1807:9): [True: 0, False: 19]
|
1808 | 19 | state->MatchSequence_type = make_type(state, "MatchSequence", |
1809 | 19 | state->pattern_type, |
1810 | 19 | MatchSequence_fields, 1, |
1811 | 19 | "MatchSequence(pattern* patterns)"); |
1812 | 19 | if (!state->MatchSequence_type) return 0; Branch (1812:9): [True: 0, False: 19]
|
1813 | 19 | state->MatchMapping_type = make_type(state, "MatchMapping", |
1814 | 19 | state->pattern_type, |
1815 | 19 | MatchMapping_fields, 3, |
1816 | 19 | "MatchMapping(expr* keys, pattern* patterns, identifier? rest)"); |
1817 | 19 | if (!state->MatchMapping_type) return 0; Branch (1817:9): [True: 0, False: 19]
|
1818 | 19 | if (PyObject_SetAttr(state->MatchMapping_type, state->rest, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1818:9): [True: 0, False: 19]
|
1819 | 0 | return 0; |
1820 | 19 | state->MatchClass_type = make_type(state, "MatchClass", |
1821 | 19 | state->pattern_type, MatchClass_fields, |
1822 | 19 | 4, |
1823 | 19 | "MatchClass(expr cls, pattern* patterns, identifier* kwd_attrs, pattern* kwd_patterns)"); |
1824 | 19 | if (!state->MatchClass_type) return 0; Branch (1824:9): [True: 0, False: 19]
|
1825 | 19 | state->MatchStar_type = make_type(state, "MatchStar", state->pattern_type, |
1826 | 19 | MatchStar_fields, 1, |
1827 | 19 | "MatchStar(identifier? name)"); |
1828 | 19 | if (!state->MatchStar_type) return 0; Branch (1828:9): [True: 0, False: 19]
|
1829 | 19 | if (PyObject_SetAttr(state->MatchStar_type, state->name, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1829:9): [True: 0, False: 19]
|
1830 | 0 | return 0; |
1831 | 19 | state->MatchAs_type = make_type(state, "MatchAs", state->pattern_type, |
1832 | 19 | MatchAs_fields, 2, |
1833 | 19 | "MatchAs(pattern? pattern, identifier? name)"); |
1834 | 19 | if (!state->MatchAs_type) return 0; Branch (1834:9): [True: 0, False: 19]
|
1835 | 19 | if (PyObject_SetAttr(state->MatchAs_type, state->pattern, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1835:9): [True: 0, False: 19]
|
1836 | 0 | return 0; |
1837 | 19 | if (PyObject_SetAttr(state->MatchAs_type, state->name, Py_None) == -1) Line | Count | Source | 654 | 19 | #define Py_None (&_Py_NoneStruct) |
Branch (1837:9): [True: 0, False: 19]
|
1838 | 0 | return 0; |
1839 | 19 | state->MatchOr_type = make_type(state, "MatchOr", state->pattern_type, |
1840 | 19 | MatchOr_fields, 1, |
1841 | 19 | "MatchOr(pattern* patterns)"); |
1842 | 19 | if (!state->MatchOr_type) return 0; Branch (1842:9): [True: 0, False: 19]
|
1843 | 19 | state->type_ignore_type = make_type(state, "type_ignore", state->AST_type, |
1844 | 19 | NULL, 0, |
1845 | 19 | "type_ignore = TypeIgnore(int lineno, string tag)"); |
1846 | 19 | if (!state->type_ignore_type) return 0; Branch (1846:9): [True: 0, False: 19]
|
1847 | 19 | if (!add_attributes(state, state->type_ignore_type, NULL, 0)) return 0; Branch (1847:9): [True: 0, False: 19]
|
1848 | 19 | state->TypeIgnore_type = make_type(state, "TypeIgnore", |
1849 | 19 | state->type_ignore_type, |
1850 | 19 | TypeIgnore_fields, 2, |
1851 | 19 | "TypeIgnore(int lineno, string tag)"); |
1852 | 19 | if (!state->TypeIgnore_type) return 0; Branch (1852:9): [True: 0, False: 19]
|
1853 | | |
1854 | 19 | state->initialized = 1; |
1855 | 19 | return 1; |
1856 | 19 | } |
1857 | | |
1858 | | static int obj2ast_mod(struct ast_state *state, PyObject* obj, mod_ty* out, |
1859 | | PyArena* arena); |
1860 | | static int obj2ast_stmt(struct ast_state *state, PyObject* obj, stmt_ty* out, |
1861 | | PyArena* arena); |
1862 | | static int obj2ast_expr(struct ast_state *state, PyObject* obj, expr_ty* out, |
1863 | | PyArena* arena); |
1864 | | static int obj2ast_expr_context(struct ast_state *state, PyObject* obj, |
1865 | | expr_context_ty* out, PyArena* arena); |
1866 | | static int obj2ast_boolop(struct ast_state *state, PyObject* obj, boolop_ty* |
1867 | | out, PyArena* arena); |
1868 | | static int obj2ast_operator(struct ast_state *state, PyObject* obj, |
1869 | | operator_ty* out, PyArena* arena); |
1870 | | static int obj2ast_unaryop(struct ast_state *state, PyObject* obj, unaryop_ty* |
1871 | | out, PyArena* arena); |
1872 | | static int obj2ast_cmpop(struct ast_state *state, PyObject* obj, cmpop_ty* out, |
1873 | | PyArena* arena); |
1874 | | static int obj2ast_comprehension(struct ast_state *state, PyObject* obj, |
1875 | | comprehension_ty* out, PyArena* arena); |
1876 | | static int obj2ast_excepthandler(struct ast_state *state, PyObject* obj, |
1877 | | excepthandler_ty* out, PyArena* arena); |
1878 | | static int obj2ast_arguments(struct ast_state *state, PyObject* obj, |
1879 | | arguments_ty* out, PyArena* arena); |
1880 | | static int obj2ast_arg(struct ast_state *state, PyObject* obj, arg_ty* out, |
1881 | | PyArena* arena); |
1882 | | static int obj2ast_keyword(struct ast_state *state, PyObject* obj, keyword_ty* |
1883 | | out, PyArena* arena); |
1884 | | static int obj2ast_alias(struct ast_state *state, PyObject* obj, alias_ty* out, |
1885 | | PyArena* arena); |
1886 | | static int obj2ast_withitem(struct ast_state *state, PyObject* obj, |
1887 | | withitem_ty* out, PyArena* arena); |
1888 | | static int obj2ast_match_case(struct ast_state *state, PyObject* obj, |
1889 | | match_case_ty* out, PyArena* arena); |
1890 | | static int obj2ast_pattern(struct ast_state *state, PyObject* obj, pattern_ty* |
1891 | | out, PyArena* arena); |
1892 | | static int obj2ast_type_ignore(struct ast_state *state, PyObject* obj, |
1893 | | type_ignore_ty* out, PyArena* arena); |
1894 | | |
1895 | | mod_ty |
1896 | | _PyAST_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores, |
1897 | | PyArena *arena) |
1898 | 17.4k | { |
1899 | 17.4k | mod_ty p; |
1900 | 17.4k | p = (mod_ty)_PyArena_Malloc(arena, sizeof(*p)); |
1901 | 17.4k | if (!p) Branch (1901:9): [True: 0, False: 17.4k]
|
1902 | 0 | return NULL; |
1903 | 17.4k | p->kind = Module_kind; |
1904 | 17.4k | p->v.Module.body = body; |
1905 | 17.4k | p->v.Module.type_ignores = type_ignores; |
1906 | 17.4k | return p; |
1907 | 17.4k | } |
1908 | | |
1909 | | mod_ty |
1910 | | _PyAST_Interactive(asdl_stmt_seq * body, PyArena *arena) |
1911 | 4.11k | { |
1912 | 4.11k | mod_ty p; |
1913 | 4.11k | p = (mod_ty)_PyArena_Malloc(arena, sizeof(*p)); |
1914 | 4.11k | if (!p) Branch (1914:9): [True: 0, False: 4.11k]
|
1915 | 0 | return NULL; |
1916 | 4.11k | p->kind = Interactive_kind; |
1917 | 4.11k | p->v.Interactive.body = body; |
1918 | 4.11k | return p; |
1919 | 4.11k | } |
1920 | | |
1921 | | mod_ty |
1922 | | _PyAST_Expression(expr_ty body, PyArena *arena) |
1923 | 36.5k | { |
1924 | 36.5k | mod_ty p; |
1925 | 36.5k | if (!body) { Branch (1925:9): [True: 0, False: 36.5k]
|
1926 | 0 | PyErr_SetString(PyExc_ValueError, |
1927 | 0 | "field 'body' is required for Expression"); |
1928 | 0 | return NULL; |
1929 | 0 | } |
1930 | 36.5k | p = (mod_ty)_PyArena_Malloc(arena, sizeof(*p)); |
1931 | 36.5k | if (!p) Branch (1931:9): [True: 0, False: 36.5k]
|
1932 | 0 | return NULL; |
1933 | 36.5k | p->kind = Expression_kind; |
1934 | 36.5k | p->v.Expression.body = body; |
1935 | 36.5k | return p; |
1936 | 36.5k | } |
1937 | | |
1938 | | mod_ty |
1939 | | _PyAST_FunctionType(asdl_expr_seq * argtypes, expr_ty returns, PyArena *arena) |
1940 | 12 | { |
1941 | 12 | mod_ty p; |
1942 | 12 | if (!returns) { Branch (1942:9): [True: 0, False: 12]
|
1943 | 0 | PyErr_SetString(PyExc_ValueError, |
1944 | 0 | "field 'returns' is required for FunctionType"); |
1945 | 0 | return NULL; |
1946 | 0 | } |
1947 | 12 | p = (mod_ty)_PyArena_Malloc(arena, sizeof(*p)); |
1948 | 12 | if (!p) Branch (1948:9): [True: 0, False: 12]
|
1949 | 0 | return NULL; |
1950 | 12 | p->kind = FunctionType_kind; |
1951 | 12 | p->v.FunctionType.argtypes = argtypes; |
1952 | 12 | p->v.FunctionType.returns = returns; |
1953 | 12 | return p; |
1954 | 12 | } |
1955 | | |
1956 | | stmt_ty |
1957 | | _PyAST_FunctionDef(identifier name, arguments_ty args, asdl_stmt_seq * body, |
1958 | | asdl_expr_seq * decorator_list, expr_ty returns, string |
1959 | | type_comment, int lineno, int col_offset, int end_lineno, |
1960 | | int end_col_offset, PyArena *arena) |
1961 | 41.8k | { |
1962 | 41.8k | stmt_ty p; |
1963 | 41.8k | if (!name) { Branch (1963:9): [True: 0, False: 41.8k]
|
1964 | 0 | PyErr_SetString(PyExc_ValueError, |
1965 | 0 | "field 'name' is required for FunctionDef"); |
1966 | 0 | return NULL; |
1967 | 0 | } |
1968 | 41.8k | if (!args) { Branch (1968:9): [True: 0, False: 41.8k]
|
1969 | 0 | PyErr_SetString(PyExc_ValueError, |
1970 | 0 | "field 'args' is required for FunctionDef"); |
1971 | 0 | return NULL; |
1972 | 0 | } |
1973 | 41.8k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
1974 | 41.8k | if (!p) Branch (1974:9): [True: 0, False: 41.8k]
|
1975 | 0 | return NULL; |
1976 | 41.8k | p->kind = FunctionDef_kind; |
1977 | 41.8k | p->v.FunctionDef.name = name; |
1978 | 41.8k | p->v.FunctionDef.args = args; |
1979 | 41.8k | p->v.FunctionDef.body = body; |
1980 | 41.8k | p->v.FunctionDef.decorator_list = decorator_list; |
1981 | 41.8k | p->v.FunctionDef.returns = returns; |
1982 | 41.8k | p->v.FunctionDef.type_comment = type_comment; |
1983 | 41.8k | p->lineno = lineno; |
1984 | 41.8k | p->col_offset = col_offset; |
1985 | 41.8k | p->end_lineno = end_lineno; |
1986 | 41.8k | p->end_col_offset = end_col_offset; |
1987 | 41.8k | return p; |
1988 | 41.8k | } |
1989 | | |
1990 | | stmt_ty |
1991 | | _PyAST_AsyncFunctionDef(identifier name, arguments_ty args, asdl_stmt_seq * |
1992 | | body, asdl_expr_seq * decorator_list, expr_ty returns, |
1993 | | string type_comment, int lineno, int col_offset, int |
1994 | | end_lineno, int end_col_offset, PyArena *arena) |
1995 | 724 | { |
1996 | 724 | stmt_ty p; |
1997 | 724 | if (!name) { Branch (1997:9): [True: 0, False: 724]
|
1998 | 0 | PyErr_SetString(PyExc_ValueError, |
1999 | 0 | "field 'name' is required for AsyncFunctionDef"); |
2000 | 0 | return NULL; |
2001 | 0 | } |
2002 | 724 | if (!args) { Branch (2002:9): [True: 0, False: 724]
|
2003 | 0 | PyErr_SetString(PyExc_ValueError, |
2004 | 0 | "field 'args' is required for AsyncFunctionDef"); |
2005 | 0 | return NULL; |
2006 | 0 | } |
2007 | 724 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2008 | 724 | if (!p) Branch (2008:9): [True: 0, False: 724]
|
2009 | 0 | return NULL; |
2010 | 724 | p->kind = AsyncFunctionDef_kind; |
2011 | 724 | p->v.AsyncFunctionDef.name = name; |
2012 | 724 | p->v.AsyncFunctionDef.args = args; |
2013 | 724 | p->v.AsyncFunctionDef.body = body; |
2014 | 724 | p->v.AsyncFunctionDef.decorator_list = decorator_list; |
2015 | 724 | p->v.AsyncFunctionDef.returns = returns; |
2016 | 724 | p->v.AsyncFunctionDef.type_comment = type_comment; |
2017 | 724 | p->lineno = lineno; |
2018 | 724 | p->col_offset = col_offset; |
2019 | 724 | p->end_lineno = end_lineno; |
2020 | 724 | p->end_col_offset = end_col_offset; |
2021 | 724 | return p; |
2022 | 724 | } |
2023 | | |
2024 | | stmt_ty |
2025 | | _PyAST_ClassDef(identifier name, asdl_expr_seq * bases, asdl_keyword_seq * |
2026 | | keywords, asdl_stmt_seq * body, asdl_expr_seq * decorator_list, |
2027 | | int lineno, int col_offset, int end_lineno, int end_col_offset, |
2028 | | PyArena *arena) |
2029 | 5.52k | { |
2030 | 5.52k | stmt_ty p; |
2031 | 5.52k | if (!name) { Branch (2031:9): [True: 0, False: 5.52k]
|
2032 | 0 | PyErr_SetString(PyExc_ValueError, |
2033 | 0 | "field 'name' is required for ClassDef"); |
2034 | 0 | return NULL; |
2035 | 0 | } |
2036 | 5.52k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2037 | 5.52k | if (!p) Branch (2037:9): [True: 0, False: 5.52k]
|
2038 | 0 | return NULL; |
2039 | 5.52k | p->kind = ClassDef_kind; |
2040 | 5.52k | p->v.ClassDef.name = name; |
2041 | 5.52k | p->v.ClassDef.bases = bases; |
2042 | 5.52k | p->v.ClassDef.keywords = keywords; |
2043 | 5.52k | p->v.ClassDef.body = body; |
2044 | 5.52k | p->v.ClassDef.decorator_list = decorator_list; |
2045 | 5.52k | p->lineno = lineno; |
2046 | 5.52k | p->col_offset = col_offset; |
2047 | 5.52k | p->end_lineno = end_lineno; |
2048 | 5.52k | p->end_col_offset = end_col_offset; |
2049 | 5.52k | return p; |
2050 | 5.52k | } |
2051 | | |
2052 | | stmt_ty |
2053 | | _PyAST_Return(expr_ty value, int lineno, int col_offset, int end_lineno, int |
2054 | | end_col_offset, PyArena *arena) |
2055 | 28.0k | { |
2056 | 28.0k | stmt_ty p; |
2057 | 28.0k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2058 | 28.0k | if (!p) Branch (2058:9): [True: 0, False: 28.0k]
|
2059 | 0 | return NULL; |
2060 | 28.0k | p->kind = Return_kind; |
2061 | 28.0k | p->v.Return.value = value; |
2062 | 28.0k | p->lineno = lineno; |
2063 | 28.0k | p->col_offset = col_offset; |
2064 | 28.0k | p->end_lineno = end_lineno; |
2065 | 28.0k | p->end_col_offset = end_col_offset; |
2066 | 28.0k | return p; |
2067 | 28.0k | } |
2068 | | |
2069 | | stmt_ty |
2070 | | _PyAST_Delete(asdl_expr_seq * targets, int lineno, int col_offset, int |
2071 | | end_lineno, int end_col_offset, PyArena *arena) |
2072 | 971 | { |
2073 | 971 | stmt_ty p; |
2074 | 971 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2075 | 971 | if (!p) Branch (2075:9): [True: 0, False: 971]
|
2076 | 0 | return NULL; |
2077 | 971 | p->kind = Delete_kind; |
2078 | 971 | p->v.Delete.targets = targets; |
2079 | 971 | p->lineno = lineno; |
2080 | 971 | p->col_offset = col_offset; |
2081 | 971 | p->end_lineno = end_lineno; |
2082 | 971 | p->end_col_offset = end_col_offset; |
2083 | 971 | return p; |
2084 | 971 | } |
2085 | | |
2086 | | stmt_ty |
2087 | | _PyAST_Assign(asdl_expr_seq * targets, expr_ty value, string type_comment, int |
2088 | | lineno, int col_offset, int end_lineno, int end_col_offset, |
2089 | | PyArena *arena) |
2090 | 105k | { |
2091 | 105k | stmt_ty p; |
2092 | 105k | if (!value) { Branch (2092:9): [True: 0, False: 105k]
|
2093 | 0 | PyErr_SetString(PyExc_ValueError, |
2094 | 0 | "field 'value' is required for Assign"); |
2095 | 0 | return NULL; |
2096 | 0 | } |
2097 | 105k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2098 | 105k | if (!p) Branch (2098:9): [True: 0, False: 105k]
|
2099 | 0 | return NULL; |
2100 | 105k | p->kind = Assign_kind; |
2101 | 105k | p->v.Assign.targets = targets; |
2102 | 105k | p->v.Assign.value = value; |
2103 | 105k | p->v.Assign.type_comment = type_comment; |
2104 | 105k | p->lineno = lineno; |
2105 | 105k | p->col_offset = col_offset; |
2106 | 105k | p->end_lineno = end_lineno; |
2107 | 105k | p->end_col_offset = end_col_offset; |
2108 | 105k | return p; |
2109 | 105k | } |
2110 | | |
2111 | | stmt_ty |
2112 | | _PyAST_AugAssign(expr_ty target, operator_ty op, expr_ty value, int lineno, int |
2113 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2114 | 3.01k | { |
2115 | 3.01k | stmt_ty p; |
2116 | 3.01k | if (!target) { Branch (2116:9): [True: 0, False: 3.01k]
|
2117 | 0 | PyErr_SetString(PyExc_ValueError, |
2118 | 0 | "field 'target' is required for AugAssign"); |
2119 | 0 | return NULL; |
2120 | 0 | } |
2121 | 3.01k | if (!op) { Branch (2121:9): [True: 0, False: 3.01k]
|
2122 | 0 | PyErr_SetString(PyExc_ValueError, |
2123 | 0 | "field 'op' is required for AugAssign"); |
2124 | 0 | return NULL; |
2125 | 0 | } |
2126 | 3.01k | if (!value) { Branch (2126:9): [True: 0, False: 3.01k]
|
2127 | 0 | PyErr_SetString(PyExc_ValueError, |
2128 | 0 | "field 'value' is required for AugAssign"); |
2129 | 0 | return NULL; |
2130 | 0 | } |
2131 | 3.01k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2132 | 3.01k | if (!p) Branch (2132:9): [True: 0, False: 3.01k]
|
2133 | 0 | return NULL; |
2134 | 3.01k | p->kind = AugAssign_kind; |
2135 | 3.01k | p->v.AugAssign.target = target; |
2136 | 3.01k | p->v.AugAssign.op = op; |
2137 | 3.01k | p->v.AugAssign.value = value; |
2138 | 3.01k | p->lineno = lineno; |
2139 | 3.01k | p->col_offset = col_offset; |
2140 | 3.01k | p->end_lineno = end_lineno; |
2141 | 3.01k | p->end_col_offset = end_col_offset; |
2142 | 3.01k | return p; |
2143 | 3.01k | } |
2144 | | |
2145 | | stmt_ty |
2146 | | _PyAST_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int simple, |
2147 | | int lineno, int col_offset, int end_lineno, int |
2148 | | end_col_offset, PyArena *arena) |
2149 | 1.08k | { |
2150 | 1.08k | stmt_ty p; |
2151 | 1.08k | if (!target) { Branch (2151:9): [True: 0, False: 1.08k]
|
2152 | 0 | PyErr_SetString(PyExc_ValueError, |
2153 | 0 | "field 'target' is required for AnnAssign"); |
2154 | 0 | return NULL; |
2155 | 0 | } |
2156 | 1.08k | if (!annotation) { Branch (2156:9): [True: 0, False: 1.08k]
|
2157 | 0 | PyErr_SetString(PyExc_ValueError, |
2158 | 0 | "field 'annotation' is required for AnnAssign"); |
2159 | 0 | return NULL; |
2160 | 0 | } |
2161 | 1.08k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2162 | 1.08k | if (!p) Branch (2162:9): [True: 0, False: 1.08k]
|
2163 | 0 | return NULL; |
2164 | 1.08k | p->kind = AnnAssign_kind; |
2165 | 1.08k | p->v.AnnAssign.target = target; |
2166 | 1.08k | p->v.AnnAssign.annotation = annotation; |
2167 | 1.08k | p->v.AnnAssign.value = value; |
2168 | 1.08k | p->v.AnnAssign.simple = simple; |
2169 | 1.08k | p->lineno = lineno; |
2170 | 1.08k | p->col_offset = col_offset; |
2171 | 1.08k | p->end_lineno = end_lineno; |
2172 | 1.08k | p->end_col_offset = end_col_offset; |
2173 | 1.08k | return p; |
2174 | 1.08k | } |
2175 | | |
2176 | | stmt_ty |
2177 | | _PyAST_For(expr_ty target, expr_ty iter, asdl_stmt_seq * body, asdl_stmt_seq * |
2178 | | orelse, string type_comment, int lineno, int col_offset, int |
2179 | | end_lineno, int end_col_offset, PyArena *arena) |
2180 | 5.66k | { |
2181 | 5.66k | stmt_ty p; |
2182 | 5.66k | if (!target) { Branch (2182:9): [True: 0, False: 5.66k]
|
2183 | 0 | PyErr_SetString(PyExc_ValueError, |
2184 | 0 | "field 'target' is required for For"); |
2185 | 0 | return NULL; |
2186 | 0 | } |
2187 | 5.66k | if (!iter) { Branch (2187:9): [True: 0, False: 5.66k]
|
2188 | 0 | PyErr_SetString(PyExc_ValueError, |
2189 | 0 | "field 'iter' is required for For"); |
2190 | 0 | return NULL; |
2191 | 0 | } |
2192 | 5.66k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2193 | 5.66k | if (!p) Branch (2193:9): [True: 0, False: 5.66k]
|
2194 | 0 | return NULL; |
2195 | 5.66k | p->kind = For_kind; |
2196 | 5.66k | p->v.For.target = target; |
2197 | 5.66k | p->v.For.iter = iter; |
2198 | 5.66k | p->v.For.body = body; |
2199 | 5.66k | p->v.For.orelse = orelse; |
2200 | 5.66k | p->v.For.type_comment = type_comment; |
2201 | 5.66k | p->lineno = lineno; |
2202 | 5.66k | p->col_offset = col_offset; |
2203 | 5.66k | p->end_lineno = end_lineno; |
2204 | 5.66k | p->end_col_offset = end_col_offset; |
2205 | 5.66k | return p; |
2206 | 5.66k | } |
2207 | | |
2208 | | stmt_ty |
2209 | | _PyAST_AsyncFor(expr_ty target, expr_ty iter, asdl_stmt_seq * body, |
2210 | | asdl_stmt_seq * orelse, string type_comment, int lineno, int |
2211 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2212 | 76 | { |
2213 | 76 | stmt_ty p; |
2214 | 76 | if (!target) { Branch (2214:9): [True: 0, False: 76]
|
2215 | 0 | PyErr_SetString(PyExc_ValueError, |
2216 | 0 | "field 'target' is required for AsyncFor"); |
2217 | 0 | return NULL; |
2218 | 0 | } |
2219 | 76 | if (!iter) { Branch (2219:9): [True: 0, False: 76]
|
2220 | 0 | PyErr_SetString(PyExc_ValueError, |
2221 | 0 | "field 'iter' is required for AsyncFor"); |
2222 | 0 | return NULL; |
2223 | 0 | } |
2224 | 76 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2225 | 76 | if (!p) Branch (2225:9): [True: 0, False: 76]
|
2226 | 0 | return NULL; |
2227 | 76 | p->kind = AsyncFor_kind; |
2228 | 76 | p->v.AsyncFor.target = target; |
2229 | 76 | p->v.AsyncFor.iter = iter; |
2230 | 76 | p->v.AsyncFor.body = body; |
2231 | 76 | p->v.AsyncFor.orelse = orelse; |
2232 | 76 | p->v.AsyncFor.type_comment = type_comment; |
2233 | 76 | p->lineno = lineno; |
2234 | 76 | p->col_offset = col_offset; |
2235 | 76 | p->end_lineno = end_lineno; |
2236 | 76 | p->end_col_offset = end_col_offset; |
2237 | 76 | return p; |
2238 | 76 | } |
2239 | | |
2240 | | stmt_ty |
2241 | | _PyAST_While(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int |
2242 | | lineno, int col_offset, int end_lineno, int end_col_offset, |
2243 | | PyArena *arena) |
2244 | 1.50k | { |
2245 | 1.50k | stmt_ty p; |
2246 | 1.50k | if (!test) { Branch (2246:9): [True: 0, False: 1.50k]
|
2247 | 0 | PyErr_SetString(PyExc_ValueError, |
2248 | 0 | "field 'test' is required for While"); |
2249 | 0 | return NULL; |
2250 | 0 | } |
2251 | 1.50k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2252 | 1.50k | if (!p) Branch (2252:9): [True: 0, False: 1.50k]
|
2253 | 0 | return NULL; |
2254 | 1.50k | p->kind = While_kind; |
2255 | 1.50k | p->v.While.test = test; |
2256 | 1.50k | p->v.While.body = body; |
2257 | 1.50k | p->v.While.orelse = orelse; |
2258 | 1.50k | p->lineno = lineno; |
2259 | 1.50k | p->col_offset = col_offset; |
2260 | 1.50k | p->end_lineno = end_lineno; |
2261 | 1.50k | p->end_col_offset = end_col_offset; |
2262 | 1.50k | return p; |
2263 | 1.50k | } |
2264 | | |
2265 | | stmt_ty |
2266 | | _PyAST_If(expr_ty test, asdl_stmt_seq * body, asdl_stmt_seq * orelse, int |
2267 | | lineno, int col_offset, int end_lineno, int end_col_offset, PyArena |
2268 | | *arena) |
2269 | 237k | { |
2270 | 237k | stmt_ty p; |
2271 | 237k | if (!test) { Branch (2271:9): [True: 0, False: 237k]
|
2272 | 0 | PyErr_SetString(PyExc_ValueError, |
2273 | 0 | "field 'test' is required for If"); |
2274 | 0 | return NULL; |
2275 | 0 | } |
2276 | 237k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2277 | 237k | if (!p) Branch (2277:9): [True: 0, False: 237k]
|
2278 | 0 | return NULL; |
2279 | 237k | p->kind = If_kind; |
2280 | 237k | p->v.If.test = test; |
2281 | 237k | p->v.If.body = body; |
2282 | 237k | p->v.If.orelse = orelse; |
2283 | 237k | p->lineno = lineno; |
2284 | 237k | p->col_offset = col_offset; |
2285 | 237k | p->end_lineno = end_lineno; |
2286 | 237k | p->end_col_offset = end_col_offset; |
2287 | 237k | return p; |
2288 | 237k | } |
2289 | | |
2290 | | stmt_ty |
2291 | | _PyAST_With(asdl_withitem_seq * items, asdl_stmt_seq * body, string |
2292 | | type_comment, int lineno, int col_offset, int end_lineno, int |
2293 | | end_col_offset, PyArena *arena) |
2294 | 2.24k | { |
2295 | 2.24k | stmt_ty p; |
2296 | 2.24k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2297 | 2.24k | if (!p) Branch (2297:9): [True: 0, False: 2.24k]
|
2298 | 0 | return NULL; |
2299 | 2.24k | p->kind = With_kind; |
2300 | 2.24k | p->v.With.items = items; |
2301 | 2.24k | p->v.With.body = body; |
2302 | 2.24k | p->v.With.type_comment = type_comment; |
2303 | 2.24k | p->lineno = lineno; |
2304 | 2.24k | p->col_offset = col_offset; |
2305 | 2.24k | p->end_lineno = end_lineno; |
2306 | 2.24k | p->end_col_offset = end_col_offset; |
2307 | 2.24k | return p; |
2308 | 2.24k | } |
2309 | | |
2310 | | stmt_ty |
2311 | | _PyAST_AsyncWith(asdl_withitem_seq * items, asdl_stmt_seq * body, string |
2312 | | type_comment, int lineno, int col_offset, int end_lineno, int |
2313 | | end_col_offset, PyArena *arena) |
2314 | 76 | { |
2315 | 76 | stmt_ty p; |
2316 | 76 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2317 | 76 | if (!p) Branch (2317:9): [True: 0, False: 76]
|
2318 | 0 | return NULL; |
2319 | 76 | p->kind = AsyncWith_kind; |
2320 | 76 | p->v.AsyncWith.items = items; |
2321 | 76 | p->v.AsyncWith.body = body; |
2322 | 76 | p->v.AsyncWith.type_comment = type_comment; |
2323 | 76 | p->lineno = lineno; |
2324 | 76 | p->col_offset = col_offset; |
2325 | 76 | p->end_lineno = end_lineno; |
2326 | 76 | p->end_col_offset = end_col_offset; |
2327 | 76 | return p; |
2328 | 76 | } |
2329 | | |
2330 | | stmt_ty |
2331 | | _PyAST_Match(expr_ty subject, asdl_match_case_seq * cases, int lineno, int |
2332 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2333 | 938 | { |
2334 | 938 | stmt_ty p; |
2335 | 938 | if (!subject) { Branch (2335:9): [True: 0, False: 938]
|
2336 | 0 | PyErr_SetString(PyExc_ValueError, |
2337 | 0 | "field 'subject' is required for Match"); |
2338 | 0 | return NULL; |
2339 | 0 | } |
2340 | 938 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2341 | 938 | if (!p) Branch (2341:9): [True: 0, False: 938]
|
2342 | 0 | return NULL; |
2343 | 938 | p->kind = Match_kind; |
2344 | 938 | p->v.Match.subject = subject; |
2345 | 938 | p->v.Match.cases = cases; |
2346 | 938 | p->lineno = lineno; |
2347 | 938 | p->col_offset = col_offset; |
2348 | 938 | p->end_lineno = end_lineno; |
2349 | 938 | p->end_col_offset = end_col_offset; |
2350 | 938 | return p; |
2351 | 938 | } |
2352 | | |
2353 | | stmt_ty |
2354 | | _PyAST_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, int |
2355 | | end_lineno, int end_col_offset, PyArena *arena) |
2356 | 7.73k | { |
2357 | 7.73k | stmt_ty p; |
2358 | 7.73k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2359 | 7.73k | if (!p) Branch (2359:9): [True: 0, False: 7.73k]
|
2360 | 0 | return NULL; |
2361 | 7.73k | p->kind = Raise_kind; |
2362 | 7.73k | p->v.Raise.exc = exc; |
2363 | 7.73k | p->v.Raise.cause = cause; |
2364 | 7.73k | p->lineno = lineno; |
2365 | 7.73k | p->col_offset = col_offset; |
2366 | 7.73k | p->end_lineno = end_lineno; |
2367 | 7.73k | p->end_col_offset = end_col_offset; |
2368 | 7.73k | return p; |
2369 | 7.73k | } |
2370 | | |
2371 | | stmt_ty |
2372 | | _PyAST_Try(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers, |
2373 | | asdl_stmt_seq * orelse, asdl_stmt_seq * finalbody, int lineno, int |
2374 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2375 | 5.11k | { |
2376 | 5.11k | stmt_ty p; |
2377 | 5.11k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2378 | 5.11k | if (!p) Branch (2378:9): [True: 0, False: 5.11k]
|
2379 | 0 | return NULL; |
2380 | 5.11k | p->kind = Try_kind; |
2381 | 5.11k | p->v.Try.body = body; |
2382 | 5.11k | p->v.Try.handlers = handlers; |
2383 | 5.11k | p->v.Try.orelse = orelse; |
2384 | 5.11k | p->v.Try.finalbody = finalbody; |
2385 | 5.11k | p->lineno = lineno; |
2386 | 5.11k | p->col_offset = col_offset; |
2387 | 5.11k | p->end_lineno = end_lineno; |
2388 | 5.11k | p->end_col_offset = end_col_offset; |
2389 | 5.11k | return p; |
2390 | 5.11k | } |
2391 | | |
2392 | | stmt_ty |
2393 | | _PyAST_TryStar(asdl_stmt_seq * body, asdl_excepthandler_seq * handlers, |
2394 | | asdl_stmt_seq * orelse, asdl_stmt_seq * finalbody, int lineno, |
2395 | | int col_offset, int end_lineno, int end_col_offset, PyArena |
2396 | | *arena) |
2397 | 76 | { |
2398 | 76 | stmt_ty p; |
2399 | 76 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2400 | 76 | if (!p) Branch (2400:9): [True: 0, False: 76]
|
2401 | 0 | return NULL; |
2402 | 76 | p->kind = TryStar_kind; |
2403 | 76 | p->v.TryStar.body = body; |
2404 | 76 | p->v.TryStar.handlers = handlers; |
2405 | 76 | p->v.TryStar.orelse = orelse; |
2406 | 76 | p->v.TryStar.finalbody = finalbody; |
2407 | 76 | p->lineno = lineno; |
2408 | 76 | p->col_offset = col_offset; |
2409 | 76 | p->end_lineno = end_lineno; |
2410 | 76 | p->end_col_offset = end_col_offset; |
2411 | 76 | return p; |
2412 | 76 | } |
2413 | | |
2414 | | stmt_ty |
2415 | | _PyAST_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, int |
2416 | | end_lineno, int end_col_offset, PyArena *arena) |
2417 | 773 | { |
2418 | 773 | stmt_ty p; |
2419 | 773 | if (!test) { Branch (2419:9): [True: 0, False: 773]
|
2420 | 0 | PyErr_SetString(PyExc_ValueError, |
2421 | 0 | "field 'test' is required for Assert"); |
2422 | 0 | return NULL; |
2423 | 0 | } |
2424 | 773 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2425 | 773 | if (!p) Branch (2425:9): [True: 0, False: 773]
|
2426 | 0 | return NULL; |
2427 | 773 | p->kind = Assert_kind; |
2428 | 773 | p->v.Assert.test = test; |
2429 | 773 | p->v.Assert.msg = msg; |
2430 | 773 | p->lineno = lineno; |
2431 | 773 | p->col_offset = col_offset; |
2432 | 773 | p->end_lineno = end_lineno; |
2433 | 773 | p->end_col_offset = end_col_offset; |
2434 | 773 | return p; |
2435 | 773 | } |
2436 | | |
2437 | | stmt_ty |
2438 | | _PyAST_Import(asdl_alias_seq * names, int lineno, int col_offset, int |
2439 | | end_lineno, int end_col_offset, PyArena *arena) |
2440 | 5.12k | { |
2441 | 5.12k | stmt_ty p; |
2442 | 5.12k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2443 | 5.12k | if (!p) Branch (2443:9): [True: 0, False: 5.12k]
|
2444 | 0 | return NULL; |
2445 | 5.12k | p->kind = Import_kind; |
2446 | 5.12k | p->v.Import.names = names; |
2447 | 5.12k | p->lineno = lineno; |
2448 | 5.12k | p->col_offset = col_offset; |
2449 | 5.12k | p->end_lineno = end_lineno; |
2450 | 5.12k | p->end_col_offset = end_col_offset; |
2451 | 5.12k | return p; |
2452 | 5.12k | } |
2453 | | |
2454 | | stmt_ty |
2455 | | _PyAST_ImportFrom(identifier module, asdl_alias_seq * names, int level, int |
2456 | | lineno, int col_offset, int end_lineno, int end_col_offset, |
2457 | | PyArena *arena) |
2458 | 2.41k | { |
2459 | 2.41k | stmt_ty p; |
2460 | 2.41k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2461 | 2.41k | if (!p) Branch (2461:9): [True: 0, False: 2.41k]
|
2462 | 0 | return NULL; |
2463 | 2.41k | p->kind = ImportFrom_kind; |
2464 | 2.41k | p->v.ImportFrom.module = module; |
2465 | 2.41k | p->v.ImportFrom.names = names; |
2466 | 2.41k | p->v.ImportFrom.level = level; |
2467 | 2.41k | p->lineno = lineno; |
2468 | 2.41k | p->col_offset = col_offset; |
2469 | 2.41k | p->end_lineno = end_lineno; |
2470 | 2.41k | p->end_col_offset = end_col_offset; |
2471 | 2.41k | return p; |
2472 | 2.41k | } |
2473 | | |
2474 | | stmt_ty |
2475 | | _PyAST_Global(asdl_identifier_seq * names, int lineno, int col_offset, int |
2476 | | end_lineno, int end_col_offset, PyArena *arena) |
2477 | 232 | { |
2478 | 232 | stmt_ty p; |
2479 | 232 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2480 | 232 | if (!p) Branch (2480:9): [True: 0, False: 232]
|
2481 | 0 | return NULL; |
2482 | 232 | p->kind = Global_kind; |
2483 | 232 | p->v.Global.names = names; |
2484 | 232 | p->lineno = lineno; |
2485 | 232 | p->col_offset = col_offset; |
2486 | 232 | p->end_lineno = end_lineno; |
2487 | 232 | p->end_col_offset = end_col_offset; |
2488 | 232 | return p; |
2489 | 232 | } |
2490 | | |
2491 | | stmt_ty |
2492 | | _PyAST_Nonlocal(asdl_identifier_seq * names, int lineno, int col_offset, int |
2493 | | end_lineno, int end_col_offset, PyArena *arena) |
2494 | 131 | { |
2495 | 131 | stmt_ty p; |
2496 | 131 | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2497 | 131 | if (!p) Branch (2497:9): [True: 0, False: 131]
|
2498 | 0 | return NULL; |
2499 | 131 | p->kind = Nonlocal_kind; |
2500 | 131 | p->v.Nonlocal.names = names; |
2501 | 131 | p->lineno = lineno; |
2502 | 131 | p->col_offset = col_offset; |
2503 | 131 | p->end_lineno = end_lineno; |
2504 | 131 | p->end_col_offset = end_col_offset; |
2505 | 131 | return p; |
2506 | 131 | } |
2507 | | |
2508 | | stmt_ty |
2509 | | _PyAST_Expr(expr_ty value, int lineno, int col_offset, int end_lineno, int |
2510 | | end_col_offset, PyArena *arena) |
2511 | 265k | { |
2512 | 265k | stmt_ty p; |
2513 | 265k | if (!value) { Branch (2513:9): [True: 0, False: 265k]
|
2514 | 0 | PyErr_SetString(PyExc_ValueError, |
2515 | 0 | "field 'value' is required for Expr"); |
2516 | 0 | return NULL; |
2517 | 0 | } |
2518 | 265k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2519 | 265k | if (!p) Branch (2519:9): [True: 0, False: 265k]
|
2520 | 0 | return NULL; |
2521 | 265k | p->kind = Expr_kind; |
2522 | 265k | p->v.Expr.value = value; |
2523 | 265k | p->lineno = lineno; |
2524 | 265k | p->col_offset = col_offset; |
2525 | 265k | p->end_lineno = end_lineno; |
2526 | 265k | p->end_col_offset = end_col_offset; |
2527 | 265k | return p; |
2528 | 265k | } |
2529 | | |
2530 | | stmt_ty |
2531 | | _PyAST_Pass(int lineno, int col_offset, int end_lineno, int end_col_offset, |
2532 | | PyArena *arena) |
2533 | 7.37k | { |
2534 | 7.37k | stmt_ty p; |
2535 | 7.37k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2536 | 7.37k | if (!p) Branch (2536:9): [True: 0, False: 7.37k]
|
2537 | 0 | return NULL; |
2538 | 7.37k | p->kind = Pass_kind; |
2539 | 7.37k | p->lineno = lineno; |
2540 | 7.37k | p->col_offset = col_offset; |
2541 | 7.37k | p->end_lineno = end_lineno; |
2542 | 7.37k | p->end_col_offset = end_col_offset; |
2543 | 7.37k | return p; |
2544 | 7.37k | } |
2545 | | |
2546 | | stmt_ty |
2547 | | _PyAST_Break(int lineno, int col_offset, int end_lineno, int end_col_offset, |
2548 | | PyArena *arena) |
2549 | 1.34k | { |
2550 | 1.34k | stmt_ty p; |
2551 | 1.34k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2552 | 1.34k | if (!p) Branch (2552:9): [True: 0, False: 1.34k]
|
2553 | 0 | return NULL; |
2554 | 1.34k | p->kind = Break_kind; |
2555 | 1.34k | p->lineno = lineno; |
2556 | 1.34k | p->col_offset = col_offset; |
2557 | 1.34k | p->end_lineno = end_lineno; |
2558 | 1.34k | p->end_col_offset = end_col_offset; |
2559 | 1.34k | return p; |
2560 | 1.34k | } |
2561 | | |
2562 | | stmt_ty |
2563 | | _PyAST_Continue(int lineno, int col_offset, int end_lineno, int end_col_offset, |
2564 | | PyArena *arena) |
2565 | 1.04k | { |
2566 | 1.04k | stmt_ty p; |
2567 | 1.04k | p = (stmt_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2568 | 1.04k | if (!p) Branch (2568:9): [True: 0, False: 1.04k]
|
2569 | 0 | return NULL; |
2570 | 1.04k | p->kind = Continue_kind; |
2571 | 1.04k | p->lineno = lineno; |
2572 | 1.04k | p->col_offset = col_offset; |
2573 | 1.04k | p->end_lineno = end_lineno; |
2574 | 1.04k | p->end_col_offset = end_col_offset; |
2575 | 1.04k | return p; |
2576 | 1.04k | } |
2577 | | |
2578 | | expr_ty |
2579 | | _PyAST_BoolOp(boolop_ty op, asdl_expr_seq * values, int lineno, int col_offset, |
2580 | | int end_lineno, int end_col_offset, PyArena *arena) |
2581 | 8.28k | { |
2582 | 8.28k | expr_ty p; |
2583 | 8.28k | if (!op) { Branch (2583:9): [True: 0, False: 8.28k]
|
2584 | 0 | PyErr_SetString(PyExc_ValueError, |
2585 | 0 | "field 'op' is required for BoolOp"); |
2586 | 0 | return NULL; |
2587 | 0 | } |
2588 | 8.28k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2589 | 8.28k | if (!p) Branch (2589:9): [True: 0, False: 8.28k]
|
2590 | 0 | return NULL; |
2591 | 8.28k | p->kind = BoolOp_kind; |
2592 | 8.28k | p->v.BoolOp.op = op; |
2593 | 8.28k | p->v.BoolOp.values = values; |
2594 | 8.28k | p->lineno = lineno; |
2595 | 8.28k | p->col_offset = col_offset; |
2596 | 8.28k | p->end_lineno = end_lineno; |
2597 | 8.28k | p->end_col_offset = end_col_offset; |
2598 | 8.28k | return p; |
2599 | 8.28k | } |
2600 | | |
2601 | | expr_ty |
2602 | | _PyAST_NamedExpr(expr_ty target, expr_ty value, int lineno, int col_offset, int |
2603 | | end_lineno, int end_col_offset, PyArena *arena) |
2604 | 1.39k | { |
2605 | 1.39k | expr_ty p; |
2606 | 1.39k | if (!target) { Branch (2606:9): [True: 0, False: 1.39k]
|
2607 | 0 | PyErr_SetString(PyExc_ValueError, |
2608 | 0 | "field 'target' is required for NamedExpr"); |
2609 | 0 | return NULL; |
2610 | 0 | } |
2611 | 1.39k | if (!value) { Branch (2611:9): [True: 0, False: 1.39k]
|
2612 | 0 | PyErr_SetString(PyExc_ValueError, |
2613 | 0 | "field 'value' is required for NamedExpr"); |
2614 | 0 | return NULL; |
2615 | 0 | } |
2616 | 1.39k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2617 | 1.39k | if (!p) Branch (2617:9): [True: 0, False: 1.39k]
|
2618 | 0 | return NULL; |
2619 | 1.39k | p->kind = NamedExpr_kind; |
2620 | 1.39k | p->v.NamedExpr.target = target; |
2621 | 1.39k | p->v.NamedExpr.value = value; |
2622 | 1.39k | p->lineno = lineno; |
2623 | 1.39k | p->col_offset = col_offset; |
2624 | 1.39k | p->end_lineno = end_lineno; |
2625 | 1.39k | p->end_col_offset = end_col_offset; |
2626 | 1.39k | return p; |
2627 | 1.39k | } |
2628 | | |
2629 | | expr_ty |
2630 | | _PyAST_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int |
2631 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2632 | 385k | { |
2633 | 385k | expr_ty p; |
2634 | 385k | if (!left) { Branch (2634:9): [True: 0, False: 385k]
|
2635 | 0 | PyErr_SetString(PyExc_ValueError, |
2636 | 0 | "field 'left' is required for BinOp"); |
2637 | 0 | return NULL; |
2638 | 0 | } |
2639 | 385k | if (!op) { Branch (2639:9): [True: 0, False: 385k]
|
2640 | 0 | PyErr_SetString(PyExc_ValueError, |
2641 | 0 | "field 'op' is required for BinOp"); |
2642 | 0 | return NULL; |
2643 | 0 | } |
2644 | 385k | if (!right) { Branch (2644:9): [True: 0, False: 385k]
|
2645 | 0 | PyErr_SetString(PyExc_ValueError, |
2646 | 0 | "field 'right' is required for BinOp"); |
2647 | 0 | return NULL; |
2648 | 0 | } |
2649 | 385k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2650 | 385k | if (!p) Branch (2650:9): [True: 0, False: 385k]
|
2651 | 0 | return NULL; |
2652 | 385k | p->kind = BinOp_kind; |
2653 | 385k | p->v.BinOp.left = left; |
2654 | 385k | p->v.BinOp.op = op; |
2655 | 385k | p->v.BinOp.right = right; |
2656 | 385k | p->lineno = lineno; |
2657 | 385k | p->col_offset = col_offset; |
2658 | 385k | p->end_lineno = end_lineno; |
2659 | 385k | p->end_col_offset = end_col_offset; |
2660 | 385k | return p; |
2661 | 385k | } |
2662 | | |
2663 | | expr_ty |
2664 | | _PyAST_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, int |
2665 | | end_lineno, int end_col_offset, PyArena *arena) |
2666 | 12.6k | { |
2667 | 12.6k | expr_ty p; |
2668 | 12.6k | if (!op) { Branch (2668:9): [True: 0, False: 12.6k]
|
2669 | 0 | PyErr_SetString(PyExc_ValueError, |
2670 | 0 | "field 'op' is required for UnaryOp"); |
2671 | 0 | return NULL; |
2672 | 0 | } |
2673 | 12.6k | if (!operand) { Branch (2673:9): [True: 0, False: 12.6k]
|
2674 | 0 | PyErr_SetString(PyExc_ValueError, |
2675 | 0 | "field 'operand' is required for UnaryOp"); |
2676 | 0 | return NULL; |
2677 | 0 | } |
2678 | 12.6k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2679 | 12.6k | if (!p) Branch (2679:9): [True: 0, False: 12.6k]
|
2680 | 0 | return NULL; |
2681 | 12.6k | p->kind = UnaryOp_kind; |
2682 | 12.6k | p->v.UnaryOp.op = op; |
2683 | 12.6k | p->v.UnaryOp.operand = operand; |
2684 | 12.6k | p->lineno = lineno; |
2685 | 12.6k | p->col_offset = col_offset; |
2686 | 12.6k | p->end_lineno = end_lineno; |
2687 | 12.6k | p->end_col_offset = end_col_offset; |
2688 | 12.6k | return p; |
2689 | 12.6k | } |
2690 | | |
2691 | | expr_ty |
2692 | | _PyAST_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, int |
2693 | | end_lineno, int end_col_offset, PyArena *arena) |
2694 | 1.67k | { |
2695 | 1.67k | expr_ty p; |
2696 | 1.67k | if (!args) { Branch (2696:9): [True: 0, False: 1.67k]
|
2697 | 0 | PyErr_SetString(PyExc_ValueError, |
2698 | 0 | "field 'args' is required for Lambda"); |
2699 | 0 | return NULL; |
2700 | 0 | } |
2701 | 1.67k | if (!body) { Branch (2701:9): [True: 0, False: 1.67k]
|
2702 | 0 | PyErr_SetString(PyExc_ValueError, |
2703 | 0 | "field 'body' is required for Lambda"); |
2704 | 0 | return NULL; |
2705 | 0 | } |
2706 | 1.67k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2707 | 1.67k | if (!p) Branch (2707:9): [True: 0, False: 1.67k]
|
2708 | 0 | return NULL; |
2709 | 1.67k | p->kind = Lambda_kind; |
2710 | 1.67k | p->v.Lambda.args = args; |
2711 | 1.67k | p->v.Lambda.body = body; |
2712 | 1.67k | p->lineno = lineno; |
2713 | 1.67k | p->col_offset = col_offset; |
2714 | 1.67k | p->end_lineno = end_lineno; |
2715 | 1.67k | p->end_col_offset = end_col_offset; |
2716 | 1.67k | return p; |
2717 | 1.67k | } |
2718 | | |
2719 | | expr_ty |
2720 | | _PyAST_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int |
2721 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2722 | 1.14k | { |
2723 | 1.14k | expr_ty p; |
2724 | 1.14k | if (!test) { Branch (2724:9): [True: 0, False: 1.14k]
|
2725 | 0 | PyErr_SetString(PyExc_ValueError, |
2726 | 0 | "field 'test' is required for IfExp"); |
2727 | 0 | return NULL; |
2728 | 0 | } |
2729 | 1.14k | if (!body) { Branch (2729:9): [True: 0, False: 1.14k]
|
2730 | 0 | PyErr_SetString(PyExc_ValueError, |
2731 | 0 | "field 'body' is required for IfExp"); |
2732 | 0 | return NULL; |
2733 | 0 | } |
2734 | 1.14k | if (!orelse) { Branch (2734:9): [True: 0, False: 1.14k]
|
2735 | 0 | PyErr_SetString(PyExc_ValueError, |
2736 | 0 | "field 'orelse' is required for IfExp"); |
2737 | 0 | return NULL; |
2738 | 0 | } |
2739 | 1.14k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2740 | 1.14k | if (!p) Branch (2740:9): [True: 0, False: 1.14k]
|
2741 | 0 | return NULL; |
2742 | 1.14k | p->kind = IfExp_kind; |
2743 | 1.14k | p->v.IfExp.test = test; |
2744 | 1.14k | p->v.IfExp.body = body; |
2745 | 1.14k | p->v.IfExp.orelse = orelse; |
2746 | 1.14k | p->lineno = lineno; |
2747 | 1.14k | p->col_offset = col_offset; |
2748 | 1.14k | p->end_lineno = end_lineno; |
2749 | 1.14k | p->end_col_offset = end_col_offset; |
2750 | 1.14k | return p; |
2751 | 1.14k | } |
2752 | | |
2753 | | expr_ty |
2754 | | _PyAST_Dict(asdl_expr_seq * keys, asdl_expr_seq * values, int lineno, int |
2755 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
2756 | 9.19k | { |
2757 | 9.19k | expr_ty p; |
2758 | 9.19k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2759 | 9.19k | if (!p) Branch (2759:9): [True: 0, False: 9.19k]
|
2760 | 0 | return NULL; |
2761 | 9.19k | p->kind = Dict_kind; |
2762 | 9.19k | p->v.Dict.keys = keys; |
2763 | 9.19k | p->v.Dict.values = values; |
2764 | 9.19k | p->lineno = lineno; |
2765 | 9.19k | p->col_offset = col_offset; |
2766 | 9.19k | p->end_lineno = end_lineno; |
2767 | 9.19k | p->end_col_offset = end_col_offset; |
2768 | 9.19k | return p; |
2769 | 9.19k | } |
2770 | | |
2771 | | expr_ty |
2772 | | _PyAST_Set(asdl_expr_seq * elts, int lineno, int col_offset, int end_lineno, |
2773 | | int end_col_offset, PyArena *arena) |
2774 | 1.04k | { |
2775 | 1.04k | expr_ty p; |
2776 | 1.04k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2777 | 1.04k | if (!p) Branch (2777:9): [True: 0, False: 1.04k]
|
2778 | 0 | return NULL; |
2779 | 1.04k | p->kind = Set_kind; |
2780 | 1.04k | p->v.Set.elts = elts; |
2781 | 1.04k | p->lineno = lineno; |
2782 | 1.04k | p->col_offset = col_offset; |
2783 | 1.04k | p->end_lineno = end_lineno; |
2784 | 1.04k | p->end_col_offset = end_col_offset; |
2785 | 1.04k | return p; |
2786 | 1.04k | } |
2787 | | |
2788 | | expr_ty |
2789 | | _PyAST_ListComp(expr_ty elt, asdl_comprehension_seq * generators, int lineno, |
2790 | | int col_offset, int end_lineno, int end_col_offset, PyArena |
2791 | | *arena) |
2792 | 3.05k | { |
2793 | 3.05k | expr_ty p; |
2794 | 3.05k | if (!elt) { Branch (2794:9): [True: 0, False: 3.05k]
|
2795 | 0 | PyErr_SetString(PyExc_ValueError, |
2796 | 0 | "field 'elt' is required for ListComp"); |
2797 | 0 | return NULL; |
2798 | 0 | } |
2799 | 3.05k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2800 | 3.05k | if (!p) Branch (2800:9): [True: 0, False: 3.05k]
|
2801 | 0 | return NULL; |
2802 | 3.05k | p->kind = ListComp_kind; |
2803 | 3.05k | p->v.ListComp.elt = elt; |
2804 | 3.05k | p->v.ListComp.generators = generators; |
2805 | 3.05k | p->lineno = lineno; |
2806 | 3.05k | p->col_offset = col_offset; |
2807 | 3.05k | p->end_lineno = end_lineno; |
2808 | 3.05k | p->end_col_offset = end_col_offset; |
2809 | 3.05k | return p; |
2810 | 3.05k | } |
2811 | | |
2812 | | expr_ty |
2813 | | _PyAST_SetComp(expr_ty elt, asdl_comprehension_seq * generators, int lineno, |
2814 | | int col_offset, int end_lineno, int end_col_offset, PyArena |
2815 | | *arena) |
2816 | 476 | { |
2817 | 476 | expr_ty p; |
2818 | 476 | if (!elt) { Branch (2818:9): [True: 0, False: 476]
|
2819 | 0 | PyErr_SetString(PyExc_ValueError, |
2820 | 0 | "field 'elt' is required for SetComp"); |
2821 | 0 | return NULL; |
2822 | 0 | } |
2823 | 476 | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2824 | 476 | if (!p) Branch (2824:9): [True: 0, False: 476]
|
2825 | 0 | return NULL; |
2826 | 476 | p->kind = SetComp_kind; |
2827 | 476 | p->v.SetComp.elt = elt; |
2828 | 476 | p->v.SetComp.generators = generators; |
2829 | 476 | p->lineno = lineno; |
2830 | 476 | p->col_offset = col_offset; |
2831 | 476 | p->end_lineno = end_lineno; |
2832 | 476 | p->end_col_offset = end_col_offset; |
2833 | 476 | return p; |
2834 | 476 | } |
2835 | | |
2836 | | expr_ty |
2837 | | _PyAST_DictComp(expr_ty key, expr_ty value, asdl_comprehension_seq * |
2838 | | generators, int lineno, int col_offset, int end_lineno, int |
2839 | | end_col_offset, PyArena *arena) |
2840 | 402 | { |
2841 | 402 | expr_ty p; |
2842 | 402 | if (!key) { Branch (2842:9): [True: 0, False: 402]
|
2843 | 0 | PyErr_SetString(PyExc_ValueError, |
2844 | 0 | "field 'key' is required for DictComp"); |
2845 | 0 | return NULL; |
2846 | 0 | } |
2847 | 402 | if (!value) { Branch (2847:9): [True: 0, False: 402]
|
2848 | 0 | PyErr_SetString(PyExc_ValueError, |
2849 | 0 | "field 'value' is required for DictComp"); |
2850 | 0 | return NULL; |
2851 | 0 | } |
2852 | 402 | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2853 | 402 | if (!p) Branch (2853:9): [True: 0, False: 402]
|
2854 | 0 | return NULL; |
2855 | 402 | p->kind = DictComp_kind; |
2856 | 402 | p->v.DictComp.key = key; |
2857 | 402 | p->v.DictComp.value = value; |
2858 | 402 | p->v.DictComp.generators = generators; |
2859 | 402 | p->lineno = lineno; |
2860 | 402 | p->col_offset = col_offset; |
2861 | 402 | p->end_lineno = end_lineno; |
2862 | 402 | p->end_col_offset = end_col_offset; |
2863 | 402 | return p; |
2864 | 402 | } |
2865 | | |
2866 | | expr_ty |
2867 | | _PyAST_GeneratorExp(expr_ty elt, asdl_comprehension_seq * generators, int |
2868 | | lineno, int col_offset, int end_lineno, int end_col_offset, |
2869 | | PyArena *arena) |
2870 | 1.62k | { |
2871 | 1.62k | expr_ty p; |
2872 | 1.62k | if (!elt) { Branch (2872:9): [True: 0, False: 1.62k]
|
2873 | 0 | PyErr_SetString(PyExc_ValueError, |
2874 | 0 | "field 'elt' is required for GeneratorExp"); |
2875 | 0 | return NULL; |
2876 | 0 | } |
2877 | 1.62k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2878 | 1.62k | if (!p) Branch (2878:9): [True: 0, False: 1.62k]
|
2879 | 0 | return NULL; |
2880 | 1.62k | p->kind = GeneratorExp_kind; |
2881 | 1.62k | p->v.GeneratorExp.elt = elt; |
2882 | 1.62k | p->v.GeneratorExp.generators = generators; |
2883 | 1.62k | p->lineno = lineno; |
2884 | 1.62k | p->col_offset = col_offset; |
2885 | 1.62k | p->end_lineno = end_lineno; |
2886 | 1.62k | p->end_col_offset = end_col_offset; |
2887 | 1.62k | return p; |
2888 | 1.62k | } |
2889 | | |
2890 | | expr_ty |
2891 | | _PyAST_Await(expr_ty value, int lineno, int col_offset, int end_lineno, int |
2892 | | end_col_offset, PyArena *arena) |
2893 | 181 | { |
2894 | 181 | expr_ty p; |
2895 | 181 | if (!value) { Branch (2895:9): [True: 0, False: 181]
|
2896 | 0 | PyErr_SetString(PyExc_ValueError, |
2897 | 0 | "field 'value' is required for Await"); |
2898 | 0 | return NULL; |
2899 | 0 | } |
2900 | 181 | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2901 | 181 | if (!p) Branch (2901:9): [True: 0, False: 181]
|
2902 | 0 | return NULL; |
2903 | 181 | p->kind = Await_kind; |
2904 | 181 | p->v.Await.value = value; |
2905 | 181 | p->lineno = lineno; |
2906 | 181 | p->col_offset = col_offset; |
2907 | 181 | p->end_lineno = end_lineno; |
2908 | 181 | p->end_col_offset = end_col_offset; |
2909 | 181 | return p; |
2910 | 181 | } |
2911 | | |
2912 | | expr_ty |
2913 | | _PyAST_Yield(expr_ty value, int lineno, int col_offset, int end_lineno, int |
2914 | | end_col_offset, PyArena *arena) |
2915 | 1.21k | { |
2916 | 1.21k | expr_ty p; |
2917 | 1.21k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2918 | 1.21k | if (!p) Branch (2918:9): [True: 0, False: 1.21k]
|
2919 | 0 | return NULL; |
2920 | 1.21k | p->kind = Yield_kind; |
2921 | 1.21k | p->v.Yield.value = value; |
2922 | 1.21k | p->lineno = lineno; |
2923 | 1.21k | p->col_offset = col_offset; |
2924 | 1.21k | p->end_lineno = end_lineno; |
2925 | 1.21k | p->end_col_offset = end_col_offset; |
2926 | 1.21k | return p; |
2927 | 1.21k | } |
2928 | | |
2929 | | expr_ty |
2930 | | _PyAST_YieldFrom(expr_ty value, int lineno, int col_offset, int end_lineno, int |
2931 | | end_col_offset, PyArena *arena) |
2932 | 246 | { |
2933 | 246 | expr_ty p; |
2934 | 246 | if (!value) { Branch (2934:9): [True: 1, False: 245]
|
2935 | 1 | PyErr_SetString(PyExc_ValueError, |
2936 | 1 | "field 'value' is required for YieldFrom"); |
2937 | 1 | return NULL; |
2938 | 1 | } |
2939 | 245 | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2940 | 245 | if (!p) Branch (2940:9): [True: 0, False: 245]
|
2941 | 0 | return NULL; |
2942 | 245 | p->kind = YieldFrom_kind; |
2943 | 245 | p->v.YieldFrom.value = value; |
2944 | 245 | p->lineno = lineno; |
2945 | 245 | p->col_offset = col_offset; |
2946 | 245 | p->end_lineno = end_lineno; |
2947 | 245 | p->end_col_offset = end_col_offset; |
2948 | 245 | return p; |
2949 | 245 | } |
2950 | | |
2951 | | expr_ty |
2952 | | _PyAST_Compare(expr_ty left, asdl_int_seq * ops, asdl_expr_seq * comparators, |
2953 | | int lineno, int col_offset, int end_lineno, int end_col_offset, |
2954 | | PyArena *arena) |
2955 | 30.0k | { |
2956 | 30.0k | expr_ty p; |
2957 | 30.0k | if (!left) { Branch (2957:9): [True: 0, False: 30.0k]
|
2958 | 0 | PyErr_SetString(PyExc_ValueError, |
2959 | 0 | "field 'left' is required for Compare"); |
2960 | 0 | return NULL; |
2961 | 0 | } |
2962 | 30.0k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2963 | 30.0k | if (!p) Branch (2963:9): [True: 0, False: 30.0k]
|
2964 | 0 | return NULL; |
2965 | 30.0k | p->kind = Compare_kind; |
2966 | 30.0k | p->v.Compare.left = left; |
2967 | 30.0k | p->v.Compare.ops = ops; |
2968 | 30.0k | p->v.Compare.comparators = comparators; |
2969 | 30.0k | p->lineno = lineno; |
2970 | 30.0k | p->col_offset = col_offset; |
2971 | 30.0k | p->end_lineno = end_lineno; |
2972 | 30.0k | p->end_col_offset = end_col_offset; |
2973 | 30.0k | return p; |
2974 | 30.0k | } |
2975 | | |
2976 | | expr_ty |
2977 | | _PyAST_Call(expr_ty func, asdl_expr_seq * args, asdl_keyword_seq * keywords, |
2978 | | int lineno, int col_offset, int end_lineno, int end_col_offset, |
2979 | | PyArena *arena) |
2980 | 844k | { |
2981 | 844k | expr_ty p; |
2982 | 844k | if (!func) { Branch (2982:9): [True: 0, False: 844k]
|
2983 | 0 | PyErr_SetString(PyExc_ValueError, |
2984 | 0 | "field 'func' is required for Call"); |
2985 | 0 | return NULL; |
2986 | 0 | } |
2987 | 844k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
2988 | 844k | if (!p) Branch (2988:9): [True: 0, False: 844k]
|
2989 | 0 | return NULL; |
2990 | 844k | p->kind = Call_kind; |
2991 | 844k | p->v.Call.func = func; |
2992 | 844k | p->v.Call.args = args; |
2993 | 844k | p->v.Call.keywords = keywords; |
2994 | 844k | p->lineno = lineno; |
2995 | 844k | p->col_offset = col_offset; |
2996 | 844k | p->end_lineno = end_lineno; |
2997 | 844k | p->end_col_offset = end_col_offset; |
2998 | 844k | return p; |
2999 | 844k | } |
3000 | | |
3001 | | expr_ty |
3002 | | _PyAST_FormattedValue(expr_ty value, int conversion, expr_ty format_spec, int |
3003 | | lineno, int col_offset, int end_lineno, int |
3004 | | end_col_offset, PyArena *arena) |
3005 | 79.5k | { |
3006 | 79.5k | expr_ty p; |
3007 | 79.5k | if (!value) { Branch (3007:9): [True: 0, False: 79.5k]
|
3008 | 0 | PyErr_SetString(PyExc_ValueError, |
3009 | 0 | "field 'value' is required for FormattedValue"); |
3010 | 0 | return NULL; |
3011 | 0 | } |
3012 | 79.5k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3013 | 79.5k | if (!p) Branch (3013:9): [True: 0, False: 79.5k]
|
3014 | 0 | return NULL; |
3015 | 79.5k | p->kind = FormattedValue_kind; |
3016 | 79.5k | p->v.FormattedValue.value = value; |
3017 | 79.5k | p->v.FormattedValue.conversion = conversion; |
3018 | 79.5k | p->v.FormattedValue.format_spec = format_spec; |
3019 | 79.5k | p->lineno = lineno; |
3020 | 79.5k | p->col_offset = col_offset; |
3021 | 79.5k | p->end_lineno = end_lineno; |
3022 | 79.5k | p->end_col_offset = end_col_offset; |
3023 | 79.5k | return p; |
3024 | 79.5k | } |
3025 | | |
3026 | | expr_ty |
3027 | | _PyAST_JoinedStr(asdl_expr_seq * values, int lineno, int col_offset, int |
3028 | | end_lineno, int end_col_offset, PyArena *arena) |
3029 | 8.38k | { |
3030 | 8.38k | expr_ty p; |
3031 | 8.38k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3032 | 8.38k | if (!p) Branch (3032:9): [True: 0, False: 8.38k]
|
3033 | 0 | return NULL; |
3034 | 8.38k | p->kind = JoinedStr_kind; |
3035 | 8.38k | p->v.JoinedStr.values = values; |
3036 | 8.38k | p->lineno = lineno; |
3037 | 8.38k | p->col_offset = col_offset; |
3038 | 8.38k | p->end_lineno = end_lineno; |
3039 | 8.38k | p->end_col_offset = end_col_offset; |
3040 | 8.38k | return p; |
3041 | 8.38k | } |
3042 | | |
3043 | | expr_ty |
3044 | | _PyAST_Constant(constant value, string kind, int lineno, int col_offset, int |
3045 | | end_lineno, int end_col_offset, PyArena *arena) |
3046 | 1.65M | { |
3047 | 1.65M | expr_ty p; |
3048 | 1.65M | if (!value) { Branch (3048:9): [True: 0, False: 1.65M]
|
3049 | 0 | PyErr_SetString(PyExc_ValueError, |
3050 | 0 | "field 'value' is required for Constant"); |
3051 | 0 | return NULL; |
3052 | 0 | } |
3053 | 1.65M | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3054 | 1.65M | if (!p) Branch (3054:9): [True: 0, False: 1.65M]
|
3055 | 0 | return NULL; |
3056 | 1.65M | p->kind = Constant_kind; |
3057 | 1.65M | p->v.Constant.value = value; |
3058 | 1.65M | p->v.Constant.kind = kind; |
3059 | 1.65M | p->lineno = lineno; |
3060 | 1.65M | p->col_offset = col_offset; |
3061 | 1.65M | p->end_lineno = end_lineno; |
3062 | 1.65M | p->end_col_offset = end_col_offset; |
3063 | 1.65M | return p; |
3064 | 1.65M | } |
3065 | | |
3066 | | expr_ty |
3067 | | _PyAST_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int |
3068 | | lineno, int col_offset, int end_lineno, int end_col_offset, |
3069 | | PyArena *arena) |
3070 | 821k | { |
3071 | 821k | expr_ty p; |
3072 | 821k | if (!value) { Branch (3072:9): [True: 0, False: 821k]
|
3073 | 0 | PyErr_SetString(PyExc_ValueError, |
3074 | 0 | "field 'value' is required for Attribute"); |
3075 | 0 | return NULL; |
3076 | 0 | } |
3077 | 821k | if (!attr) { Branch (3077:9): [True: 0, False: 821k]
|
3078 | 0 | PyErr_SetString(PyExc_ValueError, |
3079 | 0 | "field 'attr' is required for Attribute"); |
3080 | 0 | return NULL; |
3081 | 0 | } |
3082 | 821k | if (!ctx) { Branch (3082:9): [True: 0, False: 821k]
|
3083 | 0 | PyErr_SetString(PyExc_ValueError, |
3084 | 0 | "field 'ctx' is required for Attribute"); |
3085 | 0 | return NULL; |
3086 | 0 | } |
3087 | 821k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3088 | 821k | if (!p) Branch (3088:9): [True: 0, False: 821k]
|
3089 | 0 | return NULL; |
3090 | 821k | p->kind = Attribute_kind; |
3091 | 821k | p->v.Attribute.value = value; |
3092 | 821k | p->v.Attribute.attr = attr; |
3093 | 821k | p->v.Attribute.ctx = ctx; |
3094 | 821k | p->lineno = lineno; |
3095 | 821k | p->col_offset = col_offset; |
3096 | 821k | p->end_lineno = end_lineno; |
3097 | 821k | p->end_col_offset = end_col_offset; |
3098 | 821k | return p; |
3099 | 821k | } |
3100 | | |
3101 | | expr_ty |
3102 | | _PyAST_Subscript(expr_ty value, expr_ty slice, expr_context_ty ctx, int lineno, |
3103 | | int col_offset, int end_lineno, int end_col_offset, PyArena |
3104 | | *arena) |
3105 | 640k | { |
3106 | 640k | expr_ty p; |
3107 | 640k | if (!value) { Branch (3107:9): [True: 0, False: 640k]
|
3108 | 0 | PyErr_SetString(PyExc_ValueError, |
3109 | 0 | "field 'value' is required for Subscript"); |
3110 | 0 | return NULL; |
3111 | 0 | } |
3112 | 640k | if (!slice) { Branch (3112:9): [True: 0, False: 640k]
|
3113 | 0 | PyErr_SetString(PyExc_ValueError, |
3114 | 0 | "field 'slice' is required for Subscript"); |
3115 | 0 | return NULL; |
3116 | 0 | } |
3117 | 640k | if (!ctx) { Branch (3117:9): [True: 0, False: 640k]
|
3118 | 0 | PyErr_SetString(PyExc_ValueError, |
3119 | 0 | "field 'ctx' is required for Subscript"); |
3120 | 0 | return NULL; |
3121 | 0 | } |
3122 | 640k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3123 | 640k | if (!p) Branch (3123:9): [True: 0, False: 640k]
|
3124 | 0 | return NULL; |
3125 | 640k | p->kind = Subscript_kind; |
3126 | 640k | p->v.Subscript.value = value; |
3127 | 640k | p->v.Subscript.slice = slice; |
3128 | 640k | p->v.Subscript.ctx = ctx; |
3129 | 640k | p->lineno = lineno; |
3130 | 640k | p->col_offset = col_offset; |
3131 | 640k | p->end_lineno = end_lineno; |
3132 | 640k | p->end_col_offset = end_col_offset; |
3133 | 640k | return p; |
3134 | 640k | } |
3135 | | |
3136 | | expr_ty |
3137 | | _PyAST_Starred(expr_ty value, expr_context_ty ctx, int lineno, int col_offset, |
3138 | | int end_lineno, int end_col_offset, PyArena *arena) |
3139 | 3.70k | { |
3140 | 3.70k | expr_ty p; |
3141 | 3.70k | if (!value) { Branch (3141:9): [True: 0, False: 3.70k]
|
3142 | 0 | PyErr_SetString(PyExc_ValueError, |
3143 | 0 | "field 'value' is required for Starred"); |
3144 | 0 | return NULL; |
3145 | 0 | } |
3146 | 3.70k | if (!ctx) { Branch (3146:9): [True: 0, False: 3.70k]
|
3147 | 0 | PyErr_SetString(PyExc_ValueError, |
3148 | 0 | "field 'ctx' is required for Starred"); |
3149 | 0 | return NULL; |
3150 | 0 | } |
3151 | 3.70k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3152 | 3.70k | if (!p) Branch (3152:9): [True: 0, False: 3.70k]
|
3153 | 0 | return NULL; |
3154 | 3.70k | p->kind = Starred_kind; |
3155 | 3.70k | p->v.Starred.value = value; |
3156 | 3.70k | p->v.Starred.ctx = ctx; |
3157 | 3.70k | p->lineno = lineno; |
3158 | 3.70k | p->col_offset = col_offset; |
3159 | 3.70k | p->end_lineno = end_lineno; |
3160 | 3.70k | p->end_col_offset = end_col_offset; |
3161 | 3.70k | return p; |
3162 | 3.70k | } |
3163 | | |
3164 | | expr_ty |
3165 | | _PyAST_Name(identifier id, expr_context_ty ctx, int lineno, int col_offset, int |
3166 | | end_lineno, int end_col_offset, PyArena *arena) |
3167 | 6.93M | { |
3168 | 6.93M | expr_ty p; |
3169 | 6.93M | if (!id) { Branch (3169:9): [True: 0, False: 6.93M]
|
3170 | 0 | PyErr_SetString(PyExc_ValueError, |
3171 | 0 | "field 'id' is required for Name"); |
3172 | 0 | return NULL; |
3173 | 0 | } |
3174 | 6.93M | if (!ctx) { Branch (3174:9): [True: 0, False: 6.93M]
|
3175 | 0 | PyErr_SetString(PyExc_ValueError, |
3176 | 0 | "field 'ctx' is required for Name"); |
3177 | 0 | return NULL; |
3178 | 0 | } |
3179 | 6.93M | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3180 | 6.93M | if (!p) Branch (3180:9): [True: 0, False: 6.93M]
|
3181 | 0 | return NULL; |
3182 | 6.93M | p->kind = Name_kind; |
3183 | 6.93M | p->v.Name.id = id; |
3184 | 6.93M | p->v.Name.ctx = ctx; |
3185 | 6.93M | p->lineno = lineno; |
3186 | 6.93M | p->col_offset = col_offset; |
3187 | 6.93M | p->end_lineno = end_lineno; |
3188 | 6.93M | p->end_col_offset = end_col_offset; |
3189 | 6.93M | return p; |
3190 | 6.93M | } |
3191 | | |
3192 | | expr_ty |
3193 | | _PyAST_List(asdl_expr_seq * elts, expr_context_ty ctx, int lineno, int |
3194 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
3195 | 21.7k | { |
3196 | 21.7k | expr_ty p; |
3197 | 21.7k | if (!ctx) { Branch (3197:9): [True: 0, False: 21.7k]
|
3198 | 0 | PyErr_SetString(PyExc_ValueError, |
3199 | 0 | "field 'ctx' is required for List"); |
3200 | 0 | return NULL; |
3201 | 0 | } |
3202 | 21.7k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3203 | 21.7k | if (!p) Branch (3203:9): [True: 0, False: 21.7k]
|
3204 | 0 | return NULL; |
3205 | 21.7k | p->kind = List_kind; |
3206 | 21.7k | p->v.List.elts = elts; |
3207 | 21.7k | p->v.List.ctx = ctx; |
3208 | 21.7k | p->lineno = lineno; |
3209 | 21.7k | p->col_offset = col_offset; |
3210 | 21.7k | p->end_lineno = end_lineno; |
3211 | 21.7k | p->end_col_offset = end_col_offset; |
3212 | 21.7k | return p; |
3213 | 21.7k | } |
3214 | | |
3215 | | expr_ty |
3216 | | _PyAST_Tuple(asdl_expr_seq * elts, expr_context_ty ctx, int lineno, int |
3217 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
3218 | 91.3k | { |
3219 | 91.3k | expr_ty p; |
3220 | 91.3k | if (!ctx) { Branch (3220:9): [True: 0, False: 91.3k]
|
3221 | 0 | PyErr_SetString(PyExc_ValueError, |
3222 | 0 | "field 'ctx' is required for Tuple"); |
3223 | 0 | return NULL; |
3224 | 0 | } |
3225 | 91.3k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3226 | 91.3k | if (!p) Branch (3226:9): [True: 0, False: 91.3k]
|
3227 | 0 | return NULL; |
3228 | 91.3k | p->kind = Tuple_kind; |
3229 | 91.3k | p->v.Tuple.elts = elts; |
3230 | 91.3k | p->v.Tuple.ctx = ctx; |
3231 | 91.3k | p->lineno = lineno; |
3232 | 91.3k | p->col_offset = col_offset; |
3233 | 91.3k | p->end_lineno = end_lineno; |
3234 | 91.3k | p->end_col_offset = end_col_offset; |
3235 | 91.3k | return p; |
3236 | 91.3k | } |
3237 | | |
3238 | | expr_ty |
3239 | | _PyAST_Slice(expr_ty lower, expr_ty upper, expr_ty step, int lineno, int |
3240 | | col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
3241 | 6.65k | { |
3242 | 6.65k | expr_ty p; |
3243 | 6.65k | p = (expr_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3244 | 6.65k | if (!p) Branch (3244:9): [True: 0, False: 6.65k]
|
3245 | 0 | return NULL; |
3246 | 6.65k | p->kind = Slice_kind; |
3247 | 6.65k | p->v.Slice.lower = lower; |
3248 | 6.65k | p->v.Slice.upper = upper; |
3249 | 6.65k | p->v.Slice.step = step; |
3250 | 6.65k | p->lineno = lineno; |
3251 | 6.65k | p->col_offset = col_offset; |
3252 | 6.65k | p->end_lineno = end_lineno; |
3253 | 6.65k | p->end_col_offset = end_col_offset; |
3254 | 6.65k | return p; |
3255 | 6.65k | } |
3256 | | |
3257 | | comprehension_ty |
3258 | | _PyAST_comprehension(expr_ty target, expr_ty iter, asdl_expr_seq * ifs, int |
3259 | | is_async, PyArena *arena) |
3260 | 6.03k | { |
3261 | 6.03k | comprehension_ty p; |
3262 | 6.03k | if (!target) { Branch (3262:9): [True: 0, False: 6.03k]
|
3263 | 0 | PyErr_SetString(PyExc_ValueError, |
3264 | 0 | "field 'target' is required for comprehension"); |
3265 | 0 | return NULL; |
3266 | 0 | } |
3267 | 6.03k | if (!iter) { Branch (3267:9): [True: 0, False: 6.03k]
|
3268 | 0 | PyErr_SetString(PyExc_ValueError, |
3269 | 0 | "field 'iter' is required for comprehension"); |
3270 | 0 | return NULL; |
3271 | 0 | } |
3272 | 6.03k | p = (comprehension_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3273 | 6.03k | if (!p) Branch (3273:9): [True: 0, False: 6.03k]
|
3274 | 0 | return NULL; |
3275 | 6.03k | p->target = target; |
3276 | 6.03k | p->iter = iter; |
3277 | 6.03k | p->ifs = ifs; |
3278 | 6.03k | p->is_async = is_async; |
3279 | 6.03k | return p; |
3280 | 6.03k | } |
3281 | | |
3282 | | excepthandler_ty |
3283 | | _PyAST_ExceptHandler(expr_ty type, identifier name, asdl_stmt_seq * body, int |
3284 | | lineno, int col_offset, int end_lineno, int |
3285 | | end_col_offset, PyArena *arena) |
3286 | 4.83k | { |
3287 | 4.83k | excepthandler_ty p; |
3288 | 4.83k | p = (excepthandler_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3289 | 4.83k | if (!p) Branch (3289:9): [True: 0, False: 4.83k]
|
3290 | 0 | return NULL; |
3291 | 4.83k | p->kind = ExceptHandler_kind; |
3292 | 4.83k | p->v.ExceptHandler.type = type; |
3293 | 4.83k | p->v.ExceptHandler.name = name; |
3294 | 4.83k | p->v.ExceptHandler.body = body; |
3295 | 4.83k | p->lineno = lineno; |
3296 | 4.83k | p->col_offset = col_offset; |
3297 | 4.83k | p->end_lineno = end_lineno; |
3298 | 4.83k | p->end_col_offset = end_col_offset; |
3299 | 4.83k | return p; |
3300 | 4.83k | } |
3301 | | |
3302 | | arguments_ty |
3303 | | _PyAST_arguments(asdl_arg_seq * posonlyargs, asdl_arg_seq * args, arg_ty |
3304 | | vararg, asdl_arg_seq * kwonlyargs, asdl_expr_seq * |
3305 | | kw_defaults, arg_ty kwarg, asdl_expr_seq * defaults, PyArena |
3306 | | *arena) |
3307 | 42.1k | { |
3308 | 42.1k | arguments_ty p; |
3309 | 42.1k | p = (arguments_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3310 | 42.1k | if (!p) Branch (3310:9): [True: 0, False: 42.1k]
|
3311 | 0 | return NULL; |
3312 | 42.1k | p->posonlyargs = posonlyargs; |
3313 | 42.1k | p->args = args; |
3314 | 42.1k | p->vararg = vararg; |
3315 | 42.1k | p->kwonlyargs = kwonlyargs; |
3316 | 42.1k | p->kw_defaults = kw_defaults; |
3317 | 42.1k | p->kwarg = kwarg; |
3318 | 42.1k | p->defaults = defaults; |
3319 | 42.1k | return p; |
3320 | 42.1k | } |
3321 | | |
3322 | | arg_ty |
3323 | | _PyAST_arg(identifier arg, expr_ty annotation, string type_comment, int lineno, |
3324 | | int col_offset, int end_lineno, int end_col_offset, PyArena *arena) |
3325 | 453k | { |
3326 | 453k | arg_ty p; |
3327 | 453k | if (!arg) { Branch (3327:9): [True: 0, False: 453k]
|
3328 | 0 | PyErr_SetString(PyExc_ValueError, |
3329 | 0 | "field 'arg' is required for arg"); |
3330 | 0 | return NULL; |
3331 | 0 | } |
3332 | 453k | p = (arg_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3333 | 453k | if (!p) Branch (3333:9): [True: 0, False: 453k]
|
3334 | 0 | return NULL; |
3335 | 453k | p->arg = arg; |
3336 | 453k | p->annotation = annotation; |
3337 | 453k | p->type_comment = type_comment; |
3338 | 453k | p->lineno = lineno; |
3339 | 453k | p->col_offset = col_offset; |
3340 | 453k | p->end_lineno = end_lineno; |
3341 | 453k | p->end_col_offset = end_col_offset; |
3342 | 453k | return p; |
3343 | 453k | } |
3344 | | |
3345 | | keyword_ty |
3346 | | _PyAST_keyword(identifier arg, expr_ty value, int lineno, int col_offset, int |
3347 | | end_lineno, int end_col_offset, PyArena *arena) |
3348 | 22.2k | { |
3349 | 22.2k | keyword_ty p; |
3350 | 22.2k | if (!value) { Branch (3350:9): [True: 0, False: 22.2k]
|
3351 | 0 | PyErr_SetString(PyExc_ValueError, |
3352 | 0 | "field 'value' is required for keyword"); |
3353 | 0 | return NULL; |
3354 | 0 | } |
3355 | 22.2k | p = (keyword_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3356 | 22.2k | if (!p) Branch (3356:9): [True: 0, False: 22.2k]
|
3357 | 0 | return NULL; |
3358 | 22.2k | p->arg = arg; |
3359 | 22.2k | p->value = value; |
3360 | 22.2k | p->lineno = lineno; |
3361 | 22.2k | p->col_offset = col_offset; |
3362 | 22.2k | p->end_lineno = end_lineno; |
3363 | 22.2k | p->end_col_offset = end_col_offset; |
3364 | 22.2k | return p; |
3365 | 22.2k | } |
3366 | | |
3367 | | alias_ty |
3368 | | _PyAST_alias(identifier name, identifier asname, int lineno, int col_offset, |
3369 | | int end_lineno, int end_col_offset, PyArena *arena) |
3370 | 8.74k | { |
3371 | 8.74k | alias_ty p; |
3372 | 8.74k | if (!name) { Branch (3372:9): [True: 0, False: 8.74k]
|
3373 | 0 | PyErr_SetString(PyExc_ValueError, |
3374 | 0 | "field 'name' is required for alias"); |
3375 | 0 | return NULL; |
3376 | 0 | } |
3377 | 8.74k | p = (alias_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3378 | 8.74k | if (!p) Branch (3378:9): [True: 0, False: 8.74k]
|
3379 | 0 | return NULL; |
3380 | 8.74k | p->name = name; |
3381 | 8.74k | p->asname = asname; |
3382 | 8.74k | p->lineno = lineno; |
3383 | 8.74k | p->col_offset = col_offset; |
3384 | 8.74k | p->end_lineno = end_lineno; |
3385 | 8.74k | p->end_col_offset = end_col_offset; |
3386 | 8.74k | return p; |
3387 | 8.74k | } |
3388 | | |
3389 | | withitem_ty |
3390 | | _PyAST_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena *arena) |
3391 | 2.50k | { |
3392 | 2.50k | withitem_ty p; |
3393 | 2.50k | if (!context_expr) { Branch (3393:9): [True: 0, False: 2.50k]
|
3394 | 0 | PyErr_SetString(PyExc_ValueError, |
3395 | 0 | "field 'context_expr' is required for withitem"); |
3396 | 0 | return NULL; |
3397 | 0 | } |
3398 | 2.50k | p = (withitem_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3399 | 2.50k | if (!p) Branch (3399:9): [True: 0, False: 2.50k]
|
3400 | 0 | return NULL; |
3401 | 2.50k | p->context_expr = context_expr; |
3402 | 2.50k | p->optional_vars = optional_vars; |
3403 | 2.50k | return p; |
3404 | 2.50k | } |
3405 | | |
3406 | | match_case_ty |
3407 | | _PyAST_match_case(pattern_ty pattern, expr_ty guard, asdl_stmt_seq * body, |
3408 | | PyArena *arena) |
3409 | 1.31k | { |
3410 | 1.31k | match_case_ty p; |
3411 | 1.31k | if (!pattern) { Branch (3411:9): [True: 0, False: 1.31k]
|
3412 | 0 | PyErr_SetString(PyExc_ValueError, |
3413 | 0 | "field 'pattern' is required for match_case"); |
3414 | 0 | return NULL; |
3415 | 0 | } |
3416 | 1.31k | p = (match_case_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3417 | 1.31k | if (!p) Branch (3417:9): [True: 0, False: 1.31k]
|
3418 | 0 | return NULL; |
3419 | 1.31k | p->pattern = pattern; |
3420 | 1.31k | p->guard = guard; |
3421 | 1.31k | p->body = body; |
3422 | 1.31k | return p; |
3423 | 1.31k | } |
3424 | | |
3425 | | pattern_ty |
3426 | | _PyAST_MatchValue(expr_ty value, int lineno, int col_offset, int end_lineno, |
3427 | | int end_col_offset, PyArena *arena) |
3428 | 1.17k | { |
3429 | 1.17k | pattern_ty p; |
3430 | 1.17k | if (!value) { Branch (3430:9): [True: 0, False: 1.17k]
|
3431 | 0 | PyErr_SetString(PyExc_ValueError, |
3432 | 0 | "field 'value' is required for MatchValue"); |
3433 | 0 | return NULL; |
3434 | 0 | } |
3435 | 1.17k | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3436 | 1.17k | if (!p) Branch (3436:9): [True: 0, False: 1.17k]
|
3437 | 0 | return NULL; |
3438 | 1.17k | p->kind = MatchValue_kind; |
3439 | 1.17k | p->v.MatchValue.value = value; |
3440 | 1.17k | p->lineno = lineno; |
3441 | 1.17k | p->col_offset = col_offset; |
3442 | 1.17k | p->end_lineno = end_lineno; |
3443 | 1.17k | p->end_col_offset = end_col_offset; |
3444 | 1.17k | return p; |
3445 | 1.17k | } |
3446 | | |
3447 | | pattern_ty |
3448 | | _PyAST_MatchSingleton(constant value, int lineno, int col_offset, int |
3449 | | end_lineno, int end_col_offset, PyArena *arena) |
3450 | 43 | { |
3451 | 43 | pattern_ty p; |
3452 | 43 | if (!value) { Branch (3452:9): [True: 0, False: 43]
|
3453 | 0 | PyErr_SetString(PyExc_ValueError, |
3454 | 0 | "field 'value' is required for MatchSingleton"); |
3455 | 0 | return NULL; |
3456 | 0 | } |
3457 | 43 | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3458 | 43 | if (!p) Branch (3458:9): [True: 0, False: 43]
|
3459 | 0 | return NULL; |
3460 | 43 | p->kind = MatchSingleton_kind; |
3461 | 43 | p->v.MatchSingleton.value = value; |
3462 | 43 | p->lineno = lineno; |
3463 | 43 | p->col_offset = col_offset; |
3464 | 43 | p->end_lineno = end_lineno; |
3465 | 43 | p->end_col_offset = end_col_offset; |
3466 | 43 | return p; |
3467 | 43 | } |
3468 | | |
3469 | | pattern_ty |
3470 | | _PyAST_MatchSequence(asdl_pattern_seq * patterns, int lineno, int col_offset, |
3471 | | int end_lineno, int end_col_offset, PyArena *arena) |
3472 | 607 | { |
3473 | 607 | pattern_ty p; |
3474 | 607 | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3475 | 607 | if (!p) Branch (3475:9): [True: 0, False: 607]
|
3476 | 0 | return NULL; |
3477 | 607 | p->kind = MatchSequence_kind; |
3478 | 607 | p->v.MatchSequence.patterns = patterns; |
3479 | 607 | p->lineno = lineno; |
3480 | 607 | p->col_offset = col_offset; |
3481 | 607 | p->end_lineno = end_lineno; |
3482 | 607 | p->end_col_offset = end_col_offset; |
3483 | 607 | return p; |
3484 | 607 | } |
3485 | | |
3486 | | pattern_ty |
3487 | | _PyAST_MatchMapping(asdl_expr_seq * keys, asdl_pattern_seq * patterns, |
3488 | | identifier rest, int lineno, int col_offset, int |
3489 | | end_lineno, int end_col_offset, PyArena *arena) |
3490 | 355 | { |
3491 | 355 | pattern_ty p; |
3492 | 355 | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3493 | 355 | if (!p) Branch (3493:9): [True: 0, False: 355]
|
3494 | 0 | return NULL; |
3495 | 355 | p->kind = MatchMapping_kind; |
3496 | 355 | p->v.MatchMapping.keys = keys; |
3497 | 355 | p->v.MatchMapping.patterns = patterns; |
3498 | 355 | p->v.MatchMapping.rest = rest; |
3499 | 355 | p->lineno = lineno; |
3500 | 355 | p->col_offset = col_offset; |
3501 | 355 | p->end_lineno = end_lineno; |
3502 | 355 | p->end_col_offset = end_col_offset; |
3503 | 355 | return p; |
3504 | 355 | } |
3505 | | |
3506 | | pattern_ty |
3507 | | _PyAST_MatchClass(expr_ty cls, asdl_pattern_seq * patterns, asdl_identifier_seq |
3508 | | * kwd_attrs, asdl_pattern_seq * kwd_patterns, int lineno, int |
3509 | | col_offset, int end_lineno, int end_col_offset, PyArena |
3510 | | *arena) |
3511 | 196 | { |
3512 | 196 | pattern_ty p; |
3513 | 196 | if (!cls) { Branch (3513:9): [True: 0, False: 196]
|
3514 | 0 | PyErr_SetString(PyExc_ValueError, |
3515 | 0 | "field 'cls' is required for MatchClass"); |
3516 | 0 | return NULL; |
3517 | 0 | } |
3518 | 196 | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3519 | 196 | if (!p) Branch (3519:9): [True: 0, False: 196]
|
3520 | 0 | return NULL; |
3521 | 196 | p->kind = MatchClass_kind; |
3522 | 196 | p->v.MatchClass.cls = cls; |
3523 | 196 | p->v.MatchClass.patterns = patterns; |
3524 | 196 | p->v.MatchClass.kwd_attrs = kwd_attrs; |
3525 | 196 | p->v.MatchClass.kwd_patterns = kwd_patterns; |
3526 | 196 | p->lineno = lineno; |
3527 | 196 | p->col_offset = col_offset; |
3528 | 196 | p->end_lineno = end_lineno; |
3529 | 196 | p->end_col_offset = end_col_offset; |
3530 | 196 | return p; |
3531 | 196 | } |
3532 | | |
3533 | | pattern_ty |
3534 | | _PyAST_MatchStar(identifier name, int lineno, int col_offset, int end_lineno, |
3535 | | int end_col_offset, PyArena *arena) |
3536 | 142 | { |
3537 | 142 | pattern_ty p; |
3538 | 142 | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3539 | 142 | if (!p) Branch (3539:9): [True: 0, False: 142]
|
3540 | 0 | return NULL; |
3541 | 142 | p->kind = MatchStar_kind; |
3542 | 142 | p->v.MatchStar.name = name; |
3543 | 142 | p->lineno = lineno; |
3544 | 142 | p->col_offset = col_offset; |
3545 | 142 | p->end_lineno = end_lineno; |
3546 | 142 | p->end_col_offset = end_col_offset; |
3547 | 142 | return p; |
3548 | 142 | } |
3549 | | |
3550 | | pattern_ty |
3551 | | _PyAST_MatchAs(pattern_ty pattern, identifier name, int lineno, int col_offset, |
3552 | | int end_lineno, int end_col_offset, PyArena *arena) |
3553 | 1.18k | { |
3554 | 1.18k | pattern_ty p; |
3555 | 1.18k | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3556 | 1.18k | if (!p) Branch (3556:9): [True: 0, False: 1.18k]
|
3557 | 0 | return NULL; |
3558 | 1.18k | p->kind = MatchAs_kind; |
3559 | 1.18k | p->v.MatchAs.pattern = pattern; |
3560 | 1.18k | p->v.MatchAs.name = name; |
3561 | 1.18k | p->lineno = lineno; |
3562 | 1.18k | p->col_offset = col_offset; |
3563 | 1.18k | p->end_lineno = end_lineno; |
3564 | 1.18k | p->end_col_offset = end_col_offset; |
3565 | 1.18k | return p; |
3566 | 1.18k | } |
3567 | | |
3568 | | pattern_ty |
3569 | | _PyAST_MatchOr(asdl_pattern_seq * patterns, int lineno, int col_offset, int |
3570 | | end_lineno, int end_col_offset, PyArena *arena) |
3571 | 532 | { |
3572 | 532 | pattern_ty p; |
3573 | 532 | p = (pattern_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3574 | 532 | if (!p) Branch (3574:9): [True: 0, False: 532]
|
3575 | 0 | return NULL; |
3576 | 532 | p->kind = MatchOr_kind; |
3577 | 532 | p->v.MatchOr.patterns = patterns; |
3578 | 532 | p->lineno = lineno; |
3579 | 532 | p->col_offset = col_offset; |
3580 | 532 | p->end_lineno = end_lineno; |
3581 | 532 | p->end_col_offset = end_col_offset; |
3582 | 532 | return p; |
3583 | 532 | } |
3584 | | |
3585 | | type_ignore_ty |
3586 | | _PyAST_TypeIgnore(int lineno, string tag, PyArena *arena) |
3587 | 74 | { |
3588 | 74 | type_ignore_ty p; |
3589 | 74 | if (!tag) { Branch (3589:9): [True: 0, False: 74]
|
3590 | 0 | PyErr_SetString(PyExc_ValueError, |
3591 | 0 | "field 'tag' is required for TypeIgnore"); |
3592 | 0 | return NULL; |
3593 | 0 | } |
3594 | 74 | p = (type_ignore_ty)_PyArena_Malloc(arena, sizeof(*p)); |
3595 | 74 | if (!p) Branch (3595:9): [True: 0, False: 74]
|
3596 | 0 | return NULL; |
3597 | 74 | p->kind = TypeIgnore_kind; |
3598 | 74 | p->v.TypeIgnore.lineno = lineno; |
3599 | 74 | p->v.TypeIgnore.tag = tag; |
3600 | 74 | return p; |
3601 | 74 | } |
3602 | | |
3603 | | |
3604 | | PyObject* |
3605 | | ast2obj_mod(struct ast_state *state, void* _o) |
3606 | 8.94k | { |
3607 | 8.94k | mod_ty o = (mod_ty)_o; |
3608 | 8.94k | PyObject *result = NULL, *value = NULL; |
3609 | 8.94k | PyTypeObject *tp; |
3610 | 8.94k | if (!o) { Branch (3610:9): [True: 0, False: 8.94k]
|
3611 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
3612 | 0 | } |
3613 | 8.94k | switch (o->kind) { Branch (3613:13): [True: 0, False: 8.94k]
|
3614 | 8.28k | case Module_kind: Branch (3614:5): [True: 8.28k, False: 659]
|
3615 | 8.28k | tp = (PyTypeObject *)state->Module_type; |
3616 | 8.28k | result = PyType_GenericNew(tp, NULL, NULL); |
3617 | 8.28k | if (!result) goto failed; Branch (3617:13): [True: 0, False: 8.28k]
|
3618 | 8.28k | value = ast2obj_list(state, (asdl_seq*)o->v.Module.body, ast2obj_stmt); |
3619 | 8.28k | if (!value) goto failed; Branch (3619:13): [True: 0, False: 8.28k]
|
3620 | 8.28k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3620:13): [True: 0, False: 8.28k]
|
3621 | 0 | goto failed; |
3622 | 8.28k | Py_DECREF(value); Line | Count | Source | 548 | 8.28k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.28k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.28k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3623 | 8.28k | value = ast2obj_list(state, (asdl_seq*)o->v.Module.type_ignores, |
3624 | 8.28k | ast2obj_type_ignore); |
3625 | 8.28k | if (!value) goto failed; Branch (3625:13): [True: 0, False: 8.28k]
|
3626 | 8.28k | if (PyObject_SetAttr(result, state->type_ignores, value) == -1) Branch (3626:13): [True: 0, False: 8.28k]
|
3627 | 0 | goto failed; |
3628 | 8.28k | Py_DECREF(value); Line | Count | Source | 548 | 8.28k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.28k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.28k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3629 | 8.28k | break; |
3630 | 1 | case Interactive_kind: Branch (3630:5): [True: 1, False: 8.94k]
|
3631 | 1 | tp = (PyTypeObject *)state->Interactive_type; |
3632 | 1 | result = PyType_GenericNew(tp, NULL, NULL); |
3633 | 1 | if (!result) goto failed; Branch (3633:13): [True: 0, False: 1]
|
3634 | 1 | value = ast2obj_list(state, (asdl_seq*)o->v.Interactive.body, |
3635 | 1 | ast2obj_stmt); |
3636 | 1 | if (!value) goto failed; Branch (3636:13): [True: 0, False: 1]
|
3637 | 1 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3637:13): [True: 0, False: 1]
|
3638 | 0 | goto failed; |
3639 | 1 | Py_DECREF(value); Line | Count | Source | 548 | 1 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3640 | 1 | break; |
3641 | 646 | case Expression_kind: Branch (3641:5): [True: 646, False: 8.30k]
|
3642 | 646 | tp = (PyTypeObject *)state->Expression_type; |
3643 | 646 | result = PyType_GenericNew(tp, NULL, NULL); |
3644 | 646 | if (!result) goto failed; Branch (3644:13): [True: 0, False: 646]
|
3645 | 646 | value = ast2obj_expr(state, o->v.Expression.body); |
3646 | 646 | if (!value) goto failed; Branch (3646:13): [True: 0, False: 646]
|
3647 | 646 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3647:13): [True: 0, False: 646]
|
3648 | 0 | goto failed; |
3649 | 646 | Py_DECREF(value); Line | Count | Source | 548 | 646 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 646 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 646 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3650 | 646 | break; |
3651 | 12 | case FunctionType_kind: Branch (3651:5): [True: 12, False: 8.93k]
|
3652 | 12 | tp = (PyTypeObject *)state->FunctionType_type; |
3653 | 12 | result = PyType_GenericNew(tp, NULL, NULL); |
3654 | 12 | if (!result) goto failed; Branch (3654:13): [True: 0, False: 12]
|
3655 | 12 | value = ast2obj_list(state, (asdl_seq*)o->v.FunctionType.argtypes, |
3656 | 12 | ast2obj_expr); |
3657 | 12 | if (!value) goto failed; Branch (3657:13): [True: 0, False: 12]
|
3658 | 12 | if (PyObject_SetAttr(result, state->argtypes, value) == -1) Branch (3658:13): [True: 0, False: 12]
|
3659 | 0 | goto failed; |
3660 | 12 | Py_DECREF(value); Line | Count | Source | 548 | 12 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3661 | 12 | value = ast2obj_expr(state, o->v.FunctionType.returns); |
3662 | 12 | if (!value) goto failed; Branch (3662:13): [True: 0, False: 12]
|
3663 | 12 | if (PyObject_SetAttr(result, state->returns, value) == -1) Branch (3663:13): [True: 0, False: 12]
|
3664 | 0 | goto failed; |
3665 | 12 | Py_DECREF(value); Line | Count | Source | 548 | 12 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3666 | 12 | break; |
3667 | 8.94k | } |
3668 | 8.94k | return result; |
3669 | 0 | failed: |
3670 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3671 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3672 | 0 | return NULL; |
3673 | 8.94k | } |
3674 | | |
3675 | | PyObject* |
3676 | | ast2obj_stmt(struct ast_state *state, void* _o) |
3677 | 159k | { |
3678 | 159k | stmt_ty o = (stmt_ty)_o; |
3679 | 159k | PyObject *result = NULL, *value = NULL; |
3680 | 159k | PyTypeObject *tp; |
3681 | 159k | if (!o) { Branch (3681:9): [True: 0, False: 159k]
|
3682 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
3683 | 0 | } |
3684 | 159k | switch (o->kind) { Branch (3684:13): [True: 0, False: 159k]
|
3685 | 19.1k | case FunctionDef_kind: Branch (3685:5): [True: 19.1k, False: 140k]
|
3686 | 19.1k | tp = (PyTypeObject *)state->FunctionDef_type; |
3687 | 19.1k | result = PyType_GenericNew(tp, NULL, NULL); |
3688 | 19.1k | if (!result) goto failed; Branch (3688:13): [True: 0, False: 19.1k]
|
3689 | 19.1k | value = ast2obj_identifier(state, o->v.FunctionDef.name); Line | Count | Source | 1002 | 19.1k | #define ast2obj_identifier ast2obj_object |
|
3690 | 19.1k | if (!value) goto failed; Branch (3690:13): [True: 0, False: 19.1k]
|
3691 | 19.1k | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (3691:13): [True: 0, False: 19.1k]
|
3692 | 0 | goto failed; |
3693 | 19.1k | Py_DECREF(value); Line | Count | Source | 548 | 19.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3694 | 19.1k | value = ast2obj_arguments(state, o->v.FunctionDef.args); |
3695 | 19.1k | if (!value) goto failed; Branch (3695:13): [True: 0, False: 19.1k]
|
3696 | 19.1k | if (PyObject_SetAttr(result, state->args, value) == -1) Branch (3696:13): [True: 0, False: 19.1k]
|
3697 | 0 | goto failed; |
3698 | 19.1k | Py_DECREF(value); Line | Count | Source | 548 | 19.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3699 | 19.1k | value = ast2obj_list(state, (asdl_seq*)o->v.FunctionDef.body, |
3700 | 19.1k | ast2obj_stmt); |
3701 | 19.1k | if (!value) goto failed; Branch (3701:13): [True: 0, False: 19.1k]
|
3702 | 19.1k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3702:13): [True: 0, False: 19.1k]
|
3703 | 0 | goto failed; |
3704 | 19.1k | Py_DECREF(value); Line | Count | Source | 548 | 19.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3705 | 19.1k | value = ast2obj_list(state, (asdl_seq*)o->v.FunctionDef.decorator_list, |
3706 | 19.1k | ast2obj_expr); |
3707 | 19.1k | if (!value) goto failed; Branch (3707:13): [True: 0, False: 19.1k]
|
3708 | 19.1k | if (PyObject_SetAttr(result, state->decorator_list, value) == -1) Branch (3708:13): [True: 0, False: 19.1k]
|
3709 | 0 | goto failed; |
3710 | 19.1k | Py_DECREF(value); Line | Count | Source | 548 | 19.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3711 | 19.1k | value = ast2obj_expr(state, o->v.FunctionDef.returns); |
3712 | 19.1k | if (!value) goto failed; Branch (3712:13): [True: 0, False: 19.1k]
|
3713 | 19.1k | if (PyObject_SetAttr(result, state->returns, value) == -1) Branch (3713:13): [True: 0, False: 19.1k]
|
3714 | 0 | goto failed; |
3715 | 19.1k | Py_DECREF(value); Line | Count | Source | 548 | 19.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3716 | 19.1k | value = ast2obj_string(state, o->v.FunctionDef.type_comment); Line | Count | Source | 1003 | 19.1k | #define ast2obj_string ast2obj_object |
|
3717 | 19.1k | if (!value) goto failed; Branch (3717:13): [True: 0, False: 19.1k]
|
3718 | 19.1k | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (3718:13): [True: 0, False: 19.1k]
|
3719 | 0 | goto failed; |
3720 | 19.1k | Py_DECREF(value); Line | Count | Source | 548 | 19.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3721 | 19.1k | break; |
3722 | 230 | case AsyncFunctionDef_kind: Branch (3722:5): [True: 230, False: 159k]
|
3723 | 230 | tp = (PyTypeObject *)state->AsyncFunctionDef_type; |
3724 | 230 | result = PyType_GenericNew(tp, NULL, NULL); |
3725 | 230 | if (!result) goto failed; Branch (3725:13): [True: 0, False: 230]
|
3726 | 230 | value = ast2obj_identifier(state, o->v.AsyncFunctionDef.name); Line | Count | Source | 1002 | 230 | #define ast2obj_identifier ast2obj_object |
|
3727 | 230 | if (!value) goto failed; Branch (3727:13): [True: 0, False: 230]
|
3728 | 230 | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (3728:13): [True: 0, False: 230]
|
3729 | 0 | goto failed; |
3730 | 230 | Py_DECREF(value); Line | Count | Source | 548 | 230 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 230 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 230 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3731 | 230 | value = ast2obj_arguments(state, o->v.AsyncFunctionDef.args); |
3732 | 230 | if (!value) goto failed; Branch (3732:13): [True: 0, False: 230]
|
3733 | 230 | if (PyObject_SetAttr(result, state->args, value) == -1) Branch (3733:13): [True: 0, False: 230]
|
3734 | 0 | goto failed; |
3735 | 230 | Py_DECREF(value); Line | Count | Source | 548 | 230 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 230 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 230 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3736 | 230 | value = ast2obj_list(state, (asdl_seq*)o->v.AsyncFunctionDef.body, |
3737 | 230 | ast2obj_stmt); |
3738 | 230 | if (!value) goto failed; Branch (3738:13): [True: 0, False: 230]
|
3739 | 230 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3739:13): [True: 0, False: 230]
|
3740 | 0 | goto failed; |
3741 | 230 | Py_DECREF(value); Line | Count | Source | 548 | 230 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 230 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 230 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3742 | 230 | value = ast2obj_list(state, |
3743 | 230 | (asdl_seq*)o->v.AsyncFunctionDef.decorator_list, |
3744 | 230 | ast2obj_expr); |
3745 | 230 | if (!value) goto failed; Branch (3745:13): [True: 0, False: 230]
|
3746 | 230 | if (PyObject_SetAttr(result, state->decorator_list, value) == -1) Branch (3746:13): [True: 0, False: 230]
|
3747 | 0 | goto failed; |
3748 | 230 | Py_DECREF(value); Line | Count | Source | 548 | 230 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 230 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 230 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3749 | 230 | value = ast2obj_expr(state, o->v.AsyncFunctionDef.returns); |
3750 | 230 | if (!value) goto failed; Branch (3750:13): [True: 0, False: 230]
|
3751 | 230 | if (PyObject_SetAttr(result, state->returns, value) == -1) Branch (3751:13): [True: 0, False: 230]
|
3752 | 0 | goto failed; |
3753 | 230 | Py_DECREF(value); Line | Count | Source | 548 | 230 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 230 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 230 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3754 | 230 | value = ast2obj_string(state, o->v.AsyncFunctionDef.type_comment); Line | Count | Source | 1003 | 230 | #define ast2obj_string ast2obj_object |
|
3755 | 230 | if (!value) goto failed; Branch (3755:13): [True: 0, False: 230]
|
3756 | 230 | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (3756:13): [True: 0, False: 230]
|
3757 | 0 | goto failed; |
3758 | 230 | Py_DECREF(value); Line | Count | Source | 548 | 230 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 230 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 230 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3759 | 230 | break; |
3760 | 3.48k | case ClassDef_kind: Branch (3760:5): [True: 3.48k, False: 156k]
|
3761 | 3.48k | tp = (PyTypeObject *)state->ClassDef_type; |
3762 | 3.48k | result = PyType_GenericNew(tp, NULL, NULL); |
3763 | 3.48k | if (!result) goto failed; Branch (3763:13): [True: 0, False: 3.48k]
|
3764 | 3.48k | value = ast2obj_identifier(state, o->v.ClassDef.name); Line | Count | Source | 1002 | 3.48k | #define ast2obj_identifier ast2obj_object |
|
3765 | 3.48k | if (!value) goto failed; Branch (3765:13): [True: 0, False: 3.48k]
|
3766 | 3.48k | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (3766:13): [True: 0, False: 3.48k]
|
3767 | 0 | goto failed; |
3768 | 3.48k | Py_DECREF(value); Line | Count | Source | 548 | 3.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3769 | 3.48k | value = ast2obj_list(state, (asdl_seq*)o->v.ClassDef.bases, |
3770 | 3.48k | ast2obj_expr); |
3771 | 3.48k | if (!value) goto failed; Branch (3771:13): [True: 0, False: 3.48k]
|
3772 | 3.48k | if (PyObject_SetAttr(result, state->bases, value) == -1) Branch (3772:13): [True: 0, False: 3.48k]
|
3773 | 0 | goto failed; |
3774 | 3.48k | Py_DECREF(value); Line | Count | Source | 548 | 3.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3775 | 3.48k | value = ast2obj_list(state, (asdl_seq*)o->v.ClassDef.keywords, |
3776 | 3.48k | ast2obj_keyword); |
3777 | 3.48k | if (!value) goto failed; Branch (3777:13): [True: 0, False: 3.48k]
|
3778 | 3.48k | if (PyObject_SetAttr(result, state->keywords, value) == -1) Branch (3778:13): [True: 0, False: 3.48k]
|
3779 | 0 | goto failed; |
3780 | 3.48k | Py_DECREF(value); Line | Count | Source | 548 | 3.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3781 | 3.48k | value = ast2obj_list(state, (asdl_seq*)o->v.ClassDef.body, |
3782 | 3.48k | ast2obj_stmt); |
3783 | 3.48k | if (!value) goto failed; Branch (3783:13): [True: 0, False: 3.48k]
|
3784 | 3.48k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3784:13): [True: 0, False: 3.48k]
|
3785 | 0 | goto failed; |
3786 | 3.48k | Py_DECREF(value); Line | Count | Source | 548 | 3.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3787 | 3.48k | value = ast2obj_list(state, (asdl_seq*)o->v.ClassDef.decorator_list, |
3788 | 3.48k | ast2obj_expr); |
3789 | 3.48k | if (!value) goto failed; Branch (3789:13): [True: 0, False: 3.48k]
|
3790 | 3.48k | if (PyObject_SetAttr(result, state->decorator_list, value) == -1) Branch (3790:13): [True: 0, False: 3.48k]
|
3791 | 0 | goto failed; |
3792 | 3.48k | Py_DECREF(value); Line | Count | Source | 548 | 3.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3793 | 3.48k | break; |
3794 | 12.0k | case Return_kind: Branch (3794:5): [True: 12.0k, False: 147k]
|
3795 | 12.0k | tp = (PyTypeObject *)state->Return_type; |
3796 | 12.0k | result = PyType_GenericNew(tp, NULL, NULL); |
3797 | 12.0k | if (!result) goto failed; Branch (3797:13): [True: 0, False: 12.0k]
|
3798 | 12.0k | value = ast2obj_expr(state, o->v.Return.value); |
3799 | 12.0k | if (!value) goto failed; Branch (3799:13): [True: 0, False: 12.0k]
|
3800 | 12.0k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (3800:13): [True: 0, False: 12.0k]
|
3801 | 0 | goto failed; |
3802 | 12.0k | Py_DECREF(value); Line | Count | Source | 548 | 12.0k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3803 | 12.0k | break; |
3804 | 497 | case Delete_kind: Branch (3804:5): [True: 497, False: 159k]
|
3805 | 497 | tp = (PyTypeObject *)state->Delete_type; |
3806 | 497 | result = PyType_GenericNew(tp, NULL, NULL); |
3807 | 497 | if (!result) goto failed; Branch (3807:13): [True: 0, False: 497]
|
3808 | 497 | value = ast2obj_list(state, (asdl_seq*)o->v.Delete.targets, |
3809 | 497 | ast2obj_expr); |
3810 | 497 | if (!value) goto failed; Branch (3810:13): [True: 0, False: 497]
|
3811 | 497 | if (PyObject_SetAttr(result, state->targets, value) == -1) Branch (3811:13): [True: 0, False: 497]
|
3812 | 0 | goto failed; |
3813 | 497 | Py_DECREF(value); Line | Count | Source | 548 | 497 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 497 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 497 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3814 | 497 | break; |
3815 | 50.1k | case Assign_kind: Branch (3815:5): [True: 50.1k, False: 109k]
|
3816 | 50.1k | tp = (PyTypeObject *)state->Assign_type; |
3817 | 50.1k | result = PyType_GenericNew(tp, NULL, NULL); |
3818 | 50.1k | if (!result) goto failed; Branch (3818:13): [True: 0, False: 50.1k]
|
3819 | 50.1k | value = ast2obj_list(state, (asdl_seq*)o->v.Assign.targets, |
3820 | 50.1k | ast2obj_expr); |
3821 | 50.1k | if (!value) goto failed; Branch (3821:13): [True: 0, False: 50.1k]
|
3822 | 50.1k | if (PyObject_SetAttr(result, state->targets, value) == -1) Branch (3822:13): [True: 0, False: 50.1k]
|
3823 | 0 | goto failed; |
3824 | 50.1k | Py_DECREF(value); Line | Count | Source | 548 | 50.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 50.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 50.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3825 | 50.1k | value = ast2obj_expr(state, o->v.Assign.value); |
3826 | 50.1k | if (!value) goto failed; Branch (3826:13): [True: 0, False: 50.1k]
|
3827 | 50.1k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (3827:13): [True: 0, False: 50.1k]
|
3828 | 0 | goto failed; |
3829 | 50.1k | Py_DECREF(value); Line | Count | Source | 548 | 50.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 50.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 50.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3830 | 50.1k | value = ast2obj_string(state, o->v.Assign.type_comment); Line | Count | Source | 1003 | 50.1k | #define ast2obj_string ast2obj_object |
|
3831 | 50.1k | if (!value) goto failed; Branch (3831:13): [True: 0, False: 50.1k]
|
3832 | 50.1k | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (3832:13): [True: 0, False: 50.1k]
|
3833 | 0 | goto failed; |
3834 | 50.1k | Py_DECREF(value); Line | Count | Source | 548 | 50.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 50.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 50.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3835 | 50.1k | break; |
3836 | 1.26k | case AugAssign_kind: Branch (3836:5): [True: 1.26k, False: 158k]
|
3837 | 1.26k | tp = (PyTypeObject *)state->AugAssign_type; |
3838 | 1.26k | result = PyType_GenericNew(tp, NULL, NULL); |
3839 | 1.26k | if (!result) goto failed; Branch (3839:13): [True: 0, False: 1.26k]
|
3840 | 1.26k | value = ast2obj_expr(state, o->v.AugAssign.target); |
3841 | 1.26k | if (!value) goto failed; Branch (3841:13): [True: 0, False: 1.26k]
|
3842 | 1.26k | if (PyObject_SetAttr(result, state->target, value) == -1) Branch (3842:13): [True: 0, False: 1.26k]
|
3843 | 0 | goto failed; |
3844 | 1.26k | Py_DECREF(value); Line | Count | Source | 548 | 1.26k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3845 | 1.26k | value = ast2obj_operator(state, o->v.AugAssign.op); |
3846 | 1.26k | if (!value) goto failed; Branch (3846:13): [True: 0, False: 1.26k]
|
3847 | 1.26k | if (PyObject_SetAttr(result, state->op, value) == -1) Branch (3847:13): [True: 0, False: 1.26k]
|
3848 | 0 | goto failed; |
3849 | 1.26k | Py_DECREF(value); Line | Count | Source | 548 | 1.26k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3850 | 1.26k | value = ast2obj_expr(state, o->v.AugAssign.value); |
3851 | 1.26k | if (!value) goto failed; Branch (3851:13): [True: 0, False: 1.26k]
|
3852 | 1.26k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (3852:13): [True: 0, False: 1.26k]
|
3853 | 0 | goto failed; |
3854 | 1.26k | Py_DECREF(value); Line | Count | Source | 548 | 1.26k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3855 | 1.26k | break; |
3856 | 132 | case AnnAssign_kind: Branch (3856:5): [True: 132, False: 159k]
|
3857 | 132 | tp = (PyTypeObject *)state->AnnAssign_type; |
3858 | 132 | result = PyType_GenericNew(tp, NULL, NULL); |
3859 | 132 | if (!result) goto failed; Branch (3859:13): [True: 0, False: 132]
|
3860 | 132 | value = ast2obj_expr(state, o->v.AnnAssign.target); |
3861 | 132 | if (!value) goto failed; Branch (3861:13): [True: 0, False: 132]
|
3862 | 132 | if (PyObject_SetAttr(result, state->target, value) == -1) Branch (3862:13): [True: 0, False: 132]
|
3863 | 0 | goto failed; |
3864 | 132 | Py_DECREF(value); Line | Count | Source | 548 | 132 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 132 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 132 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3865 | 132 | value = ast2obj_expr(state, o->v.AnnAssign.annotation); |
3866 | 132 | if (!value) goto failed; Branch (3866:13): [True: 0, False: 132]
|
3867 | 132 | if (PyObject_SetAttr(result, state->annotation, value) == -1) Branch (3867:13): [True: 0, False: 132]
|
3868 | 0 | goto failed; |
3869 | 132 | Py_DECREF(value); Line | Count | Source | 548 | 132 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 132 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 132 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3870 | 132 | value = ast2obj_expr(state, o->v.AnnAssign.value); |
3871 | 132 | if (!value) goto failed; Branch (3871:13): [True: 0, False: 132]
|
3872 | 132 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (3872:13): [True: 0, False: 132]
|
3873 | 0 | goto failed; |
3874 | 132 | Py_DECREF(value); Line | Count | Source | 548 | 132 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 132 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 132 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3875 | 132 | value = ast2obj_int(state, o->v.AnnAssign.simple); |
3876 | 132 | if (!value) goto failed; Branch (3876:13): [True: 0, False: 132]
|
3877 | 132 | if (PyObject_SetAttr(result, state->simple, value) == -1) Branch (3877:13): [True: 0, False: 132]
|
3878 | 0 | goto failed; |
3879 | 132 | Py_DECREF(value); Line | Count | Source | 548 | 132 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 132 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 132 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3880 | 132 | break; |
3881 | 2.72k | case For_kind: Branch (3881:5): [True: 2.72k, False: 156k]
|
3882 | 2.72k | tp = (PyTypeObject *)state->For_type; |
3883 | 2.72k | result = PyType_GenericNew(tp, NULL, NULL); |
3884 | 2.72k | if (!result) goto failed; Branch (3884:13): [True: 0, False: 2.72k]
|
3885 | 2.72k | value = ast2obj_expr(state, o->v.For.target); |
3886 | 2.72k | if (!value) goto failed; Branch (3886:13): [True: 0, False: 2.72k]
|
3887 | 2.72k | if (PyObject_SetAttr(result, state->target, value) == -1) Branch (3887:13): [True: 0, False: 2.72k]
|
3888 | 0 | goto failed; |
3889 | 2.72k | Py_DECREF(value); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3890 | 2.72k | value = ast2obj_expr(state, o->v.For.iter); |
3891 | 2.72k | if (!value) goto failed; Branch (3891:13): [True: 0, False: 2.72k]
|
3892 | 2.72k | if (PyObject_SetAttr(result, state->iter, value) == -1) Branch (3892:13): [True: 0, False: 2.72k]
|
3893 | 0 | goto failed; |
3894 | 2.72k | Py_DECREF(value); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3895 | 2.72k | value = ast2obj_list(state, (asdl_seq*)o->v.For.body, ast2obj_stmt); |
3896 | 2.72k | if (!value) goto failed; Branch (3896:13): [True: 0, False: 2.72k]
|
3897 | 2.72k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3897:13): [True: 0, False: 2.72k]
|
3898 | 0 | goto failed; |
3899 | 2.72k | Py_DECREF(value); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3900 | 2.72k | value = ast2obj_list(state, (asdl_seq*)o->v.For.orelse, ast2obj_stmt); |
3901 | 2.72k | if (!value) goto failed; Branch (3901:13): [True: 0, False: 2.72k]
|
3902 | 2.72k | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (3902:13): [True: 0, False: 2.72k]
|
3903 | 0 | goto failed; |
3904 | 2.72k | Py_DECREF(value); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3905 | 2.72k | value = ast2obj_string(state, o->v.For.type_comment); Line | Count | Source | 1003 | 2.72k | #define ast2obj_string ast2obj_object |
|
3906 | 2.72k | if (!value) goto failed; Branch (3906:13): [True: 0, False: 2.72k]
|
3907 | 2.72k | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (3907:13): [True: 0, False: 2.72k]
|
3908 | 0 | goto failed; |
3909 | 2.72k | Py_DECREF(value); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3910 | 2.72k | break; |
3911 | 39 | case AsyncFor_kind: Branch (3911:5): [True: 39, False: 159k]
|
3912 | 39 | tp = (PyTypeObject *)state->AsyncFor_type; |
3913 | 39 | result = PyType_GenericNew(tp, NULL, NULL); |
3914 | 39 | if (!result) goto failed; Branch (3914:13): [True: 0, False: 39]
|
3915 | 39 | value = ast2obj_expr(state, o->v.AsyncFor.target); |
3916 | 39 | if (!value) goto failed; Branch (3916:13): [True: 0, False: 39]
|
3917 | 39 | if (PyObject_SetAttr(result, state->target, value) == -1) Branch (3917:13): [True: 0, False: 39]
|
3918 | 0 | goto failed; |
3919 | 39 | Py_DECREF(value); Line | Count | Source | 548 | 39 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 39 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 39 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3920 | 39 | value = ast2obj_expr(state, o->v.AsyncFor.iter); |
3921 | 39 | if (!value) goto failed; Branch (3921:13): [True: 0, False: 39]
|
3922 | 39 | if (PyObject_SetAttr(result, state->iter, value) == -1) Branch (3922:13): [True: 0, False: 39]
|
3923 | 0 | goto failed; |
3924 | 39 | Py_DECREF(value); Line | Count | Source | 548 | 39 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 39 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 39 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3925 | 39 | value = ast2obj_list(state, (asdl_seq*)o->v.AsyncFor.body, |
3926 | 39 | ast2obj_stmt); |
3927 | 39 | if (!value) goto failed; Branch (3927:13): [True: 0, False: 39]
|
3928 | 39 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3928:13): [True: 0, False: 39]
|
3929 | 0 | goto failed; |
3930 | 39 | Py_DECREF(value); Line | Count | Source | 548 | 39 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 39 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 39 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3931 | 39 | value = ast2obj_list(state, (asdl_seq*)o->v.AsyncFor.orelse, |
3932 | 39 | ast2obj_stmt); |
3933 | 39 | if (!value) goto failed; Branch (3933:13): [True: 0, False: 39]
|
3934 | 39 | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (3934:13): [True: 0, False: 39]
|
3935 | 0 | goto failed; |
3936 | 39 | Py_DECREF(value); Line | Count | Source | 548 | 39 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 39 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 39 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3937 | 39 | value = ast2obj_string(state, o->v.AsyncFor.type_comment); Line | Count | Source | 1003 | 39 | #define ast2obj_string ast2obj_object |
|
3938 | 39 | if (!value) goto failed; Branch (3938:13): [True: 0, False: 39]
|
3939 | 39 | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (3939:13): [True: 0, False: 39]
|
3940 | 0 | goto failed; |
3941 | 39 | Py_DECREF(value); Line | Count | Source | 548 | 39 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 39 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 39 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3942 | 39 | break; |
3943 | 689 | case While_kind: Branch (3943:5): [True: 689, False: 158k]
|
3944 | 689 | tp = (PyTypeObject *)state->While_type; |
3945 | 689 | result = PyType_GenericNew(tp, NULL, NULL); |
3946 | 689 | if (!result) goto failed; Branch (3946:13): [True: 0, False: 689]
|
3947 | 689 | value = ast2obj_expr(state, o->v.While.test); |
3948 | 689 | if (!value) goto failed; Branch (3948:13): [True: 0, False: 689]
|
3949 | 689 | if (PyObject_SetAttr(result, state->test, value) == -1) Branch (3949:13): [True: 0, False: 689]
|
3950 | 0 | goto failed; |
3951 | 689 | Py_DECREF(value); Line | Count | Source | 548 | 689 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 689 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 689 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3952 | 689 | value = ast2obj_list(state, (asdl_seq*)o->v.While.body, ast2obj_stmt); |
3953 | 689 | if (!value) goto failed; Branch (3953:13): [True: 0, False: 689]
|
3954 | 689 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3954:13): [True: 0, False: 689]
|
3955 | 0 | goto failed; |
3956 | 689 | Py_DECREF(value); Line | Count | Source | 548 | 689 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 689 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 689 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3957 | 689 | value = ast2obj_list(state, (asdl_seq*)o->v.While.orelse, ast2obj_stmt); |
3958 | 689 | if (!value) goto failed; Branch (3958:13): [True: 0, False: 689]
|
3959 | 689 | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (3959:13): [True: 0, False: 689]
|
3960 | 0 | goto failed; |
3961 | 689 | Py_DECREF(value); Line | Count | Source | 548 | 689 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 689 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 689 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3962 | 689 | break; |
3963 | 16.4k | case If_kind: Branch (3963:5): [True: 16.4k, False: 143k]
|
3964 | 16.4k | tp = (PyTypeObject *)state->If_type; |
3965 | 16.4k | result = PyType_GenericNew(tp, NULL, NULL); |
3966 | 16.4k | if (!result) goto failed; Branch (3966:13): [True: 0, False: 16.4k]
|
3967 | 16.4k | value = ast2obj_expr(state, o->v.If.test); |
3968 | 16.4k | if (!value) goto failed; Branch (3968:13): [True: 0, False: 16.4k]
|
3969 | 16.4k | if (PyObject_SetAttr(result, state->test, value) == -1) Branch (3969:13): [True: 0, False: 16.4k]
|
3970 | 0 | goto failed; |
3971 | 16.4k | Py_DECREF(value); Line | Count | Source | 548 | 16.4k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 16.4k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 16.4k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3972 | 16.4k | value = ast2obj_list(state, (asdl_seq*)o->v.If.body, ast2obj_stmt); |
3973 | 16.4k | if (!value) goto failed; Branch (3973:13): [True: 0, False: 16.4k]
|
3974 | 16.4k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3974:13): [True: 0, False: 16.4k]
|
3975 | 0 | goto failed; |
3976 | 16.4k | Py_DECREF(value); Line | Count | Source | 548 | 16.4k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 16.4k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 16.4k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3977 | 16.4k | value = ast2obj_list(state, (asdl_seq*)o->v.If.orelse, ast2obj_stmt); |
3978 | 16.4k | if (!value) goto failed; Branch (3978:13): [True: 0, False: 16.4k]
|
3979 | 16.4k | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (3979:13): [True: 0, False: 16.4k]
|
3980 | 0 | goto failed; |
3981 | 16.4k | Py_DECREF(value); Line | Count | Source | 548 | 16.4k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 16.4k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 16.4k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3982 | 16.4k | break; |
3983 | 1.43k | case With_kind: Branch (3983:5): [True: 1.43k, False: 158k]
|
3984 | 1.43k | tp = (PyTypeObject *)state->With_type; |
3985 | 1.43k | result = PyType_GenericNew(tp, NULL, NULL); |
3986 | 1.43k | if (!result) goto failed; Branch (3986:13): [True: 0, False: 1.43k]
|
3987 | 1.43k | value = ast2obj_list(state, (asdl_seq*)o->v.With.items, |
3988 | 1.43k | ast2obj_withitem); |
3989 | 1.43k | if (!value) goto failed; Branch (3989:13): [True: 0, False: 1.43k]
|
3990 | 1.43k | if (PyObject_SetAttr(result, state->items, value) == -1) Branch (3990:13): [True: 0, False: 1.43k]
|
3991 | 0 | goto failed; |
3992 | 1.43k | Py_DECREF(value); Line | Count | Source | 548 | 1.43k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.43k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.43k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3993 | 1.43k | value = ast2obj_list(state, (asdl_seq*)o->v.With.body, ast2obj_stmt); |
3994 | 1.43k | if (!value) goto failed; Branch (3994:13): [True: 0, False: 1.43k]
|
3995 | 1.43k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (3995:13): [True: 0, False: 1.43k]
|
3996 | 0 | goto failed; |
3997 | 1.43k | Py_DECREF(value); Line | Count | Source | 548 | 1.43k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.43k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.43k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
3998 | 1.43k | value = ast2obj_string(state, o->v.With.type_comment); Line | Count | Source | 1003 | 1.43k | #define ast2obj_string ast2obj_object |
|
3999 | 1.43k | if (!value) goto failed; Branch (3999:13): [True: 0, False: 1.43k]
|
4000 | 1.43k | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (4000:13): [True: 0, False: 1.43k]
|
4001 | 0 | goto failed; |
4002 | 1.43k | Py_DECREF(value); Line | Count | Source | 548 | 1.43k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.43k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.43k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4003 | 1.43k | break; |
4004 | 29 | case AsyncWith_kind: Branch (4004:5): [True: 29, False: 159k]
|
4005 | 29 | tp = (PyTypeObject *)state->AsyncWith_type; |
4006 | 29 | result = PyType_GenericNew(tp, NULL, NULL); |
4007 | 29 | if (!result) goto failed; Branch (4007:13): [True: 0, False: 29]
|
4008 | 29 | value = ast2obj_list(state, (asdl_seq*)o->v.AsyncWith.items, |
4009 | 29 | ast2obj_withitem); |
4010 | 29 | if (!value) goto failed; Branch (4010:13): [True: 0, False: 29]
|
4011 | 29 | if (PyObject_SetAttr(result, state->items, value) == -1) Branch (4011:13): [True: 0, False: 29]
|
4012 | 0 | goto failed; |
4013 | 29 | Py_DECREF(value); Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4014 | 29 | value = ast2obj_list(state, (asdl_seq*)o->v.AsyncWith.body, |
4015 | 29 | ast2obj_stmt); |
4016 | 29 | if (!value) goto failed; Branch (4016:13): [True: 0, False: 29]
|
4017 | 29 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (4017:13): [True: 0, False: 29]
|
4018 | 0 | goto failed; |
4019 | 29 | Py_DECREF(value); Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4020 | 29 | value = ast2obj_string(state, o->v.AsyncWith.type_comment); Line | Count | Source | 1003 | 29 | #define ast2obj_string ast2obj_object |
|
4021 | 29 | if (!value) goto failed; Branch (4021:13): [True: 0, False: 29]
|
4022 | 29 | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (4022:13): [True: 0, False: 29]
|
4023 | 0 | goto failed; |
4024 | 29 | Py_DECREF(value); Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4025 | 29 | break; |
4026 | 536 | case Match_kind: Branch (4026:5): [True: 536, False: 158k]
|
4027 | 536 | tp = (PyTypeObject *)state->Match_type; |
4028 | 536 | result = PyType_GenericNew(tp, NULL, NULL); |
4029 | 536 | if (!result) goto failed; Branch (4029:13): [True: 0, False: 536]
|
4030 | 536 | value = ast2obj_expr(state, o->v.Match.subject); |
4031 | 536 | if (!value) goto failed; Branch (4031:13): [True: 0, False: 536]
|
4032 | 536 | if (PyObject_SetAttr(result, state->subject, value) == -1) Branch (4032:13): [True: 0, False: 536]
|
4033 | 0 | goto failed; |
4034 | 536 | Py_DECREF(value); Line | Count | Source | 548 | 536 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 536 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 536 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4035 | 536 | value = ast2obj_list(state, (asdl_seq*)o->v.Match.cases, |
4036 | 536 | ast2obj_match_case); |
4037 | 536 | if (!value) goto failed; Branch (4037:13): [True: 0, False: 536]
|
4038 | 536 | if (PyObject_SetAttr(result, state->cases, value) == -1) Branch (4038:13): [True: 0, False: 536]
|
4039 | 0 | goto failed; |
4040 | 536 | Py_DECREF(value); Line | Count | Source | 548 | 536 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 536 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 536 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4041 | 536 | break; |
4042 | 3.59k | case Raise_kind: Branch (4042:5): [True: 3.59k, False: 155k]
|
4043 | 3.59k | tp = (PyTypeObject *)state->Raise_type; |
4044 | 3.59k | result = PyType_GenericNew(tp, NULL, NULL); |
4045 | 3.59k | if (!result) goto failed; Branch (4045:13): [True: 0, False: 3.59k]
|
4046 | 3.59k | value = ast2obj_expr(state, o->v.Raise.exc); |
4047 | 3.59k | if (!value) goto failed; Branch (4047:13): [True: 0, False: 3.59k]
|
4048 | 3.59k | if (PyObject_SetAttr(result, state->exc, value) == -1) Branch (4048:13): [True: 0, False: 3.59k]
|
4049 | 0 | goto failed; |
4050 | 3.59k | Py_DECREF(value); Line | Count | Source | 548 | 3.59k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.59k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.59k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4051 | 3.59k | value = ast2obj_expr(state, o->v.Raise.cause); |
4052 | 3.59k | if (!value) goto failed; Branch (4052:13): [True: 0, False: 3.59k]
|
4053 | 3.59k | if (PyObject_SetAttr(result, state->cause, value) == -1) Branch (4053:13): [True: 0, False: 3.59k]
|
4054 | 0 | goto failed; |
4055 | 3.59k | Py_DECREF(value); Line | Count | Source | 548 | 3.59k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.59k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.59k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4056 | 3.59k | break; |
4057 | 2.40k | case Try_kind: Branch (4057:5): [True: 2.40k, False: 157k]
|
4058 | 2.40k | tp = (PyTypeObject *)state->Try_type; |
4059 | 2.40k | result = PyType_GenericNew(tp, NULL, NULL); |
4060 | 2.40k | if (!result) goto failed; Branch (4060:13): [True: 0, False: 2.40k]
|
4061 | 2.40k | value = ast2obj_list(state, (asdl_seq*)o->v.Try.body, ast2obj_stmt); |
4062 | 2.40k | if (!value) goto failed; Branch (4062:13): [True: 0, False: 2.40k]
|
4063 | 2.40k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (4063:13): [True: 0, False: 2.40k]
|
4064 | 0 | goto failed; |
4065 | 2.40k | Py_DECREF(value); Line | Count | Source | 548 | 2.40k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4066 | 2.40k | value = ast2obj_list(state, (asdl_seq*)o->v.Try.handlers, |
4067 | 2.40k | ast2obj_excepthandler); |
4068 | 2.40k | if (!value) goto failed; Branch (4068:13): [True: 0, False: 2.40k]
|
4069 | 2.40k | if (PyObject_SetAttr(result, state->handlers, value) == -1) Branch (4069:13): [True: 0, False: 2.40k]
|
4070 | 0 | goto failed; |
4071 | 2.40k | Py_DECREF(value); Line | Count | Source | 548 | 2.40k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4072 | 2.40k | value = ast2obj_list(state, (asdl_seq*)o->v.Try.orelse, ast2obj_stmt); |
4073 | 2.40k | if (!value) goto failed; Branch (4073:13): [True: 0, False: 2.40k]
|
4074 | 2.40k | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (4074:13): [True: 0, False: 2.40k]
|
4075 | 0 | goto failed; |
4076 | 2.40k | Py_DECREF(value); Line | Count | Source | 548 | 2.40k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4077 | 2.40k | value = ast2obj_list(state, (asdl_seq*)o->v.Try.finalbody, |
4078 | 2.40k | ast2obj_stmt); |
4079 | 2.40k | if (!value) goto failed; Branch (4079:13): [True: 0, False: 2.40k]
|
4080 | 2.40k | if (PyObject_SetAttr(result, state->finalbody, value) == -1) Branch (4080:13): [True: 0, False: 2.40k]
|
4081 | 0 | goto failed; |
4082 | 2.40k | Py_DECREF(value); Line | Count | Source | 548 | 2.40k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4083 | 2.40k | break; |
4084 | 19 | case TryStar_kind: Branch (4084:5): [True: 19, False: 159k]
|
4085 | 19 | tp = (PyTypeObject *)state->TryStar_type; |
4086 | 19 | result = PyType_GenericNew(tp, NULL, NULL); |
4087 | 19 | if (!result) goto failed; Branch (4087:13): [True: 0, False: 19]
|
4088 | 19 | value = ast2obj_list(state, (asdl_seq*)o->v.TryStar.body, ast2obj_stmt); |
4089 | 19 | if (!value) goto failed; Branch (4089:13): [True: 0, False: 19]
|
4090 | 19 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (4090:13): [True: 0, False: 19]
|
4091 | 0 | goto failed; |
4092 | 19 | Py_DECREF(value); Line | Count | Source | 548 | 19 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4093 | 19 | value = ast2obj_list(state, (asdl_seq*)o->v.TryStar.handlers, |
4094 | 19 | ast2obj_excepthandler); |
4095 | 19 | if (!value) goto failed; Branch (4095:13): [True: 0, False: 19]
|
4096 | 19 | if (PyObject_SetAttr(result, state->handlers, value) == -1) Branch (4096:13): [True: 0, False: 19]
|
4097 | 0 | goto failed; |
4098 | 19 | Py_DECREF(value); Line | Count | Source | 548 | 19 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4099 | 19 | value = ast2obj_list(state, (asdl_seq*)o->v.TryStar.orelse, |
4100 | 19 | ast2obj_stmt); |
4101 | 19 | if (!value) goto failed; Branch (4101:13): [True: 0, False: 19]
|
4102 | 19 | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (4102:13): [True: 0, False: 19]
|
4103 | 0 | goto failed; |
4104 | 19 | Py_DECREF(value); Line | Count | Source | 548 | 19 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4105 | 19 | value = ast2obj_list(state, (asdl_seq*)o->v.TryStar.finalbody, |
4106 | 19 | ast2obj_stmt); |
4107 | 19 | if (!value) goto failed; Branch (4107:13): [True: 0, False: 19]
|
4108 | 19 | if (PyObject_SetAttr(result, state->finalbody, value) == -1) Branch (4108:13): [True: 0, False: 19]
|
4109 | 0 | goto failed; |
4110 | 19 | Py_DECREF(value); Line | Count | Source | 548 | 19 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4111 | 19 | break; |
4112 | 339 | case Assert_kind: Branch (4112:5): [True: 339, False: 159k]
|
4113 | 339 | tp = (PyTypeObject *)state->Assert_type; |
4114 | 339 | result = PyType_GenericNew(tp, NULL, NULL); |
4115 | 339 | if (!result) goto failed; Branch (4115:13): [True: 0, False: 339]
|
4116 | 339 | value = ast2obj_expr(state, o->v.Assert.test); |
4117 | 339 | if (!value) goto failed; Branch (4117:13): [True: 0, False: 339]
|
4118 | 339 | if (PyObject_SetAttr(result, state->test, value) == -1) Branch (4118:13): [True: 0, False: 339]
|
4119 | 0 | goto failed; |
4120 | 339 | Py_DECREF(value); Line | Count | Source | 548 | 339 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 339 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 339 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4121 | 339 | value = ast2obj_expr(state, o->v.Assert.msg); |
4122 | 339 | if (!value) goto failed; Branch (4122:13): [True: 0, False: 339]
|
4123 | 339 | if (PyObject_SetAttr(result, state->msg, value) == -1) Branch (4123:13): [True: 0, False: 339]
|
4124 | 0 | goto failed; |
4125 | 339 | Py_DECREF(value); Line | Count | Source | 548 | 339 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 339 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 339 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4126 | 339 | break; |
4127 | 1.93k | case Import_kind: Branch (4127:5): [True: 1.93k, False: 157k]
|
4128 | 1.93k | tp = (PyTypeObject *)state->Import_type; |
4129 | 1.93k | result = PyType_GenericNew(tp, NULL, NULL); |
4130 | 1.93k | if (!result) goto failed; Branch (4130:13): [True: 0, False: 1.93k]
|
4131 | 1.93k | value = ast2obj_list(state, (asdl_seq*)o->v.Import.names, |
4132 | 1.93k | ast2obj_alias); |
4133 | 1.93k | if (!value) goto failed; Branch (4133:13): [True: 0, False: 1.93k]
|
4134 | 1.93k | if (PyObject_SetAttr(result, state->names, value) == -1) Branch (4134:13): [True: 0, False: 1.93k]
|
4135 | 0 | goto failed; |
4136 | 1.93k | Py_DECREF(value); Line | Count | Source | 548 | 1.93k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.93k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.93k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4137 | 1.93k | break; |
4138 | 893 | case ImportFrom_kind: Branch (4138:5): [True: 893, False: 158k]
|
4139 | 893 | tp = (PyTypeObject *)state->ImportFrom_type; |
4140 | 893 | result = PyType_GenericNew(tp, NULL, NULL); |
4141 | 893 | if (!result) goto failed; Branch (4141:13): [True: 0, False: 893]
|
4142 | 893 | value = ast2obj_identifier(state, o->v.ImportFrom.module); Line | Count | Source | 1002 | 893 | #define ast2obj_identifier ast2obj_object |
|
4143 | 893 | if (!value) goto failed; Branch (4143:13): [True: 0, False: 893]
|
4144 | 893 | if (PyObject_SetAttr(result, state->module, value) == -1) Branch (4144:13): [True: 0, False: 893]
|
4145 | 0 | goto failed; |
4146 | 893 | Py_DECREF(value); Line | Count | Source | 548 | 893 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 893 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 893 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4147 | 893 | value = ast2obj_list(state, (asdl_seq*)o->v.ImportFrom.names, |
4148 | 893 | ast2obj_alias); |
4149 | 893 | if (!value) goto failed; Branch (4149:13): [True: 0, False: 893]
|
4150 | 893 | if (PyObject_SetAttr(result, state->names, value) == -1) Branch (4150:13): [True: 0, False: 893]
|
4151 | 0 | goto failed; |
4152 | 893 | Py_DECREF(value); Line | Count | Source | 548 | 893 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 893 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 893 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4153 | 893 | value = ast2obj_int(state, o->v.ImportFrom.level); |
4154 | 893 | if (!value) goto failed; Branch (4154:13): [True: 0, False: 893]
|
4155 | 893 | if (PyObject_SetAttr(result, state->level, value) == -1) Branch (4155:13): [True: 0, False: 893]
|
4156 | 0 | goto failed; |
4157 | 893 | Py_DECREF(value); Line | Count | Source | 548 | 893 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 893 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 893 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4158 | 893 | break; |
4159 | 105 | case Global_kind: Branch (4159:5): [True: 105, False: 159k]
|
4160 | 105 | tp = (PyTypeObject *)state->Global_type; |
4161 | 105 | result = PyType_GenericNew(tp, NULL, NULL); |
4162 | 105 | if (!result) goto failed; Branch (4162:13): [True: 0, False: 105]
|
4163 | 105 | value = ast2obj_list(state, (asdl_seq*)o->v.Global.names, |
4164 | 105 | ast2obj_identifier); Line | Count | Source | 1002 | 105 | #define ast2obj_identifier ast2obj_object |
|
4165 | 105 | if (!value) goto failed; Branch (4165:13): [True: 0, False: 105]
|
4166 | 105 | if (PyObject_SetAttr(result, state->names, value) == -1) Branch (4166:13): [True: 0, False: 105]
|
4167 | 0 | goto failed; |
4168 | 105 | Py_DECREF(value); Line | Count | Source | 548 | 105 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 105 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 105 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4169 | 105 | break; |
4170 | 54 | case Nonlocal_kind: Branch (4170:5): [True: 54, False: 159k]
|
4171 | 54 | tp = (PyTypeObject *)state->Nonlocal_type; |
4172 | 54 | result = PyType_GenericNew(tp, NULL, NULL); |
4173 | 54 | if (!result) goto failed; Branch (4173:13): [True: 0, False: 54]
|
4174 | 54 | value = ast2obj_list(state, (asdl_seq*)o->v.Nonlocal.names, |
4175 | 54 | ast2obj_identifier); Line | Count | Source | 1002 | 54 | #define ast2obj_identifier ast2obj_object |
|
4176 | 54 | if (!value) goto failed; Branch (4176:13): [True: 0, False: 54]
|
4177 | 54 | if (PyObject_SetAttr(result, state->names, value) == -1) Branch (4177:13): [True: 0, False: 54]
|
4178 | 0 | goto failed; |
4179 | 54 | Py_DECREF(value); Line | Count | Source | 548 | 54 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4180 | 54 | break; |
4181 | 35.7k | case Expr_kind: Branch (4181:5): [True: 35.7k, False: 123k]
|
4182 | 35.7k | tp = (PyTypeObject *)state->Expr_type; |
4183 | 35.7k | result = PyType_GenericNew(tp, NULL, NULL); |
4184 | 35.7k | if (!result) goto failed; Branch (4184:13): [True: 0, False: 35.7k]
|
4185 | 35.7k | value = ast2obj_expr(state, o->v.Expr.value); |
4186 | 35.7k | if (!value) goto failed; Branch (4186:13): [True: 0, False: 35.7k]
|
4187 | 35.7k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4187:13): [True: 0, False: 35.7k]
|
4188 | 0 | goto failed; |
4189 | 35.7k | Py_DECREF(value); Line | Count | Source | 548 | 35.7k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 35.7k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.7k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4190 | 35.7k | break; |
4191 | 4.66k | case Pass_kind: Branch (4191:5): [True: 4.66k, False: 154k]
|
4192 | 4.66k | tp = (PyTypeObject *)state->Pass_type; |
4193 | 4.66k | result = PyType_GenericNew(tp, NULL, NULL); |
4194 | 4.66k | if (!result) goto failed; Branch (4194:13): [True: 0, False: 4.66k]
|
4195 | 4.66k | break; |
4196 | 4.66k | case Break_kind: Branch (4196:5): [True: 543, False: 158k]
|
4197 | 543 | tp = (PyTypeObject *)state->Break_type; |
4198 | 543 | result = PyType_GenericNew(tp, NULL, NULL); |
4199 | 543 | if (!result) goto failed; Branch (4199:13): [True: 0, False: 543]
|
4200 | 543 | break; |
4201 | 543 | case Continue_kind: Branch (4201:5): [True: 452, False: 159k]
|
4202 | 452 | tp = (PyTypeObject *)state->Continue_type; |
4203 | 452 | result = PyType_GenericNew(tp, NULL, NULL); |
4204 | 452 | if (!result) goto failed; Branch (4204:13): [True: 0, False: 452]
|
4205 | 452 | break; |
4206 | 159k | } |
4207 | 159k | value = ast2obj_int(state, o->lineno); |
4208 | 159k | if (!value) goto failed; Branch (4208:9): [True: 0, False: 159k]
|
4209 | 159k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (4209:9): [True: 0, False: 159k]
|
4210 | 0 | goto failed; |
4211 | 159k | Py_DECREF(value); Line | Count | Source | 548 | 159k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 159k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 159k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4212 | 159k | value = ast2obj_int(state, o->col_offset); |
4213 | 159k | if (!value) goto failed; Branch (4213:9): [True: 0, False: 159k]
|
4214 | 159k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (4214:9): [True: 0, False: 159k]
|
4215 | 0 | goto failed; |
4216 | 159k | Py_DECREF(value); Line | Count | Source | 548 | 159k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 159k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 159k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4217 | 159k | value = ast2obj_int(state, o->end_lineno); |
4218 | 159k | if (!value) goto failed; Branch (4218:9): [True: 0, False: 159k]
|
4219 | 159k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (4219:9): [True: 0, False: 159k]
|
4220 | 0 | goto failed; |
4221 | 159k | Py_DECREF(value); Line | Count | Source | 548 | 159k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 159k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 159k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4222 | 159k | value = ast2obj_int(state, o->end_col_offset); |
4223 | 159k | if (!value) goto failed; Branch (4223:9): [True: 0, False: 159k]
|
4224 | 159k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (4224:9): [True: 0, False: 159k]
|
4225 | 0 | goto failed; |
4226 | 159k | Py_DECREF(value); Line | Count | Source | 548 | 159k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 159k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 159k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4227 | 159k | return result; |
4228 | 0 | failed: |
4229 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4230 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4231 | 0 | return NULL; |
4232 | 159k | } |
4233 | | |
4234 | | PyObject* |
4235 | | ast2obj_expr(struct ast_state *state, void* _o) |
4236 | 667k | { |
4237 | 667k | expr_ty o = (expr_ty)_o; |
4238 | 667k | PyObject *result = NULL, *value = NULL; |
4239 | 667k | PyTypeObject *tp; |
4240 | 667k | if (!o) { Branch (4240:9): [True: 64.8k, False: 603k]
|
4241 | 64.8k | Py_RETURN_NONE; Line | Count | Source | 661 | 64.8k | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 64.8k | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 64.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 64.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
4242 | 64.8k | } |
4243 | 603k | switch (o->kind) { Branch (4243:13): [True: 0, False: 603k]
|
4244 | 3.45k | case BoolOp_kind: Branch (4244:5): [True: 3.45k, False: 599k]
|
4245 | 3.45k | tp = (PyTypeObject *)state->BoolOp_type; |
4246 | 3.45k | result = PyType_GenericNew(tp, NULL, NULL); |
4247 | 3.45k | if (!result) goto failed; Branch (4247:13): [True: 0, False: 3.45k]
|
4248 | 3.45k | value = ast2obj_boolop(state, o->v.BoolOp.op); |
4249 | 3.45k | if (!value) goto failed; Branch (4249:13): [True: 0, False: 3.45k]
|
4250 | 3.45k | if (PyObject_SetAttr(result, state->op, value) == -1) Branch (4250:13): [True: 0, False: 3.45k]
|
4251 | 0 | goto failed; |
4252 | 3.45k | Py_DECREF(value); Line | Count | Source | 548 | 3.45k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.45k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.45k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4253 | 3.45k | value = ast2obj_list(state, (asdl_seq*)o->v.BoolOp.values, |
4254 | 3.45k | ast2obj_expr); |
4255 | 3.45k | if (!value) goto failed; Branch (4255:13): [True: 0, False: 3.45k]
|
4256 | 3.45k | if (PyObject_SetAttr(result, state->values, value) == -1) Branch (4256:13): [True: 0, False: 3.45k]
|
4257 | 0 | goto failed; |
4258 | 3.45k | Py_DECREF(value); Line | Count | Source | 548 | 3.45k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.45k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.45k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4259 | 3.45k | break; |
4260 | 60 | case NamedExpr_kind: Branch (4260:5): [True: 60, False: 602k]
|
4261 | 60 | tp = (PyTypeObject *)state->NamedExpr_type; |
4262 | 60 | result = PyType_GenericNew(tp, NULL, NULL); |
4263 | 60 | if (!result) goto failed; Branch (4263:13): [True: 0, False: 60]
|
4264 | 60 | value = ast2obj_expr(state, o->v.NamedExpr.target); |
4265 | 60 | if (!value) goto failed; Branch (4265:13): [True: 0, False: 60]
|
4266 | 60 | if (PyObject_SetAttr(result, state->target, value) == -1) Branch (4266:13): [True: 0, False: 60]
|
4267 | 0 | goto failed; |
4268 | 60 | Py_DECREF(value); Line | Count | Source | 548 | 60 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 60 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 60 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4269 | 60 | value = ast2obj_expr(state, o->v.NamedExpr.value); |
4270 | 60 | if (!value) goto failed; Branch (4270:13): [True: 0, False: 60]
|
4271 | 60 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4271:13): [True: 0, False: 60]
|
4272 | 0 | goto failed; |
4273 | 60 | Py_DECREF(value); Line | Count | Source | 548 | 60 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 60 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 60 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4274 | 60 | break; |
4275 | 12.2k | case BinOp_kind: Branch (4275:5): [True: 12.2k, False: 590k]
|
4276 | 12.2k | tp = (PyTypeObject *)state->BinOp_type; |
4277 | 12.2k | result = PyType_GenericNew(tp, NULL, NULL); |
4278 | 12.2k | if (!result) goto failed; Branch (4278:13): [True: 0, False: 12.2k]
|
4279 | 12.2k | value = ast2obj_expr(state, o->v.BinOp.left); |
4280 | 12.2k | if (!value) goto failed; Branch (4280:13): [True: 0, False: 12.2k]
|
4281 | 12.2k | if (PyObject_SetAttr(result, state->left, value) == -1) Branch (4281:13): [True: 0, False: 12.2k]
|
4282 | 0 | goto failed; |
4283 | 12.2k | Py_DECREF(value); Line | Count | Source | 548 | 12.2k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.2k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4284 | 12.2k | value = ast2obj_operator(state, o->v.BinOp.op); |
4285 | 12.2k | if (!value) goto failed; Branch (4285:13): [True: 0, False: 12.2k]
|
4286 | 12.2k | if (PyObject_SetAttr(result, state->op, value) == -1) Branch (4286:13): [True: 0, False: 12.2k]
|
4287 | 0 | goto failed; |
4288 | 12.2k | Py_DECREF(value); Line | Count | Source | 548 | 12.2k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.2k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4289 | 12.2k | value = ast2obj_expr(state, o->v.BinOp.right); |
4290 | 12.2k | if (!value) goto failed; Branch (4290:13): [True: 0, False: 12.2k]
|
4291 | 12.2k | if (PyObject_SetAttr(result, state->right, value) == -1) Branch (4291:13): [True: 0, False: 12.2k]
|
4292 | 0 | goto failed; |
4293 | 12.2k | Py_DECREF(value); Line | Count | Source | 548 | 12.2k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.2k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4294 | 12.2k | break; |
4295 | 4.67k | case UnaryOp_kind: Branch (4295:5): [True: 4.67k, False: 598k]
|
4296 | 4.67k | tp = (PyTypeObject *)state->UnaryOp_type; |
4297 | 4.67k | result = PyType_GenericNew(tp, NULL, NULL); |
4298 | 4.67k | if (!result) goto failed; Branch (4298:13): [True: 0, False: 4.67k]
|
4299 | 4.67k | value = ast2obj_unaryop(state, o->v.UnaryOp.op); |
4300 | 4.67k | if (!value) goto failed; Branch (4300:13): [True: 0, False: 4.67k]
|
4301 | 4.67k | if (PyObject_SetAttr(result, state->op, value) == -1) Branch (4301:13): [True: 0, False: 4.67k]
|
4302 | 0 | goto failed; |
4303 | 4.67k | Py_DECREF(value); Line | Count | Source | 548 | 4.67k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.67k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.67k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4304 | 4.67k | value = ast2obj_expr(state, o->v.UnaryOp.operand); |
4305 | 4.67k | if (!value) goto failed; Branch (4305:13): [True: 0, False: 4.67k]
|
4306 | 4.67k | if (PyObject_SetAttr(result, state->operand, value) == -1) Branch (4306:13): [True: 0, False: 4.67k]
|
4307 | 0 | goto failed; |
4308 | 4.67k | Py_DECREF(value); Line | Count | Source | 548 | 4.67k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.67k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.67k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4309 | 4.67k | break; |
4310 | 579 | case Lambda_kind: Branch (4310:5): [True: 579, False: 602k]
|
4311 | 579 | tp = (PyTypeObject *)state->Lambda_type; |
4312 | 579 | result = PyType_GenericNew(tp, NULL, NULL); |
4313 | 579 | if (!result) goto failed; Branch (4313:13): [True: 0, False: 579]
|
4314 | 579 | value = ast2obj_arguments(state, o->v.Lambda.args); |
4315 | 579 | if (!value) goto failed; Branch (4315:13): [True: 0, False: 579]
|
4316 | 579 | if (PyObject_SetAttr(result, state->args, value) == -1) Branch (4316:13): [True: 0, False: 579]
|
4317 | 0 | goto failed; |
4318 | 579 | Py_DECREF(value); Line | Count | Source | 548 | 579 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 579 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 579 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4319 | 579 | value = ast2obj_expr(state, o->v.Lambda.body); |
4320 | 579 | if (!value) goto failed; Branch (4320:13): [True: 0, False: 579]
|
4321 | 579 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (4321:13): [True: 0, False: 579]
|
4322 | 0 | goto failed; |
4323 | 579 | Py_DECREF(value); Line | Count | Source | 548 | 579 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 579 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 579 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4324 | 579 | break; |
4325 | 449 | case IfExp_kind: Branch (4325:5): [True: 449, False: 602k]
|
4326 | 449 | tp = (PyTypeObject *)state->IfExp_type; |
4327 | 449 | result = PyType_GenericNew(tp, NULL, NULL); |
4328 | 449 | if (!result) goto failed; Branch (4328:13): [True: 0, False: 449]
|
4329 | 449 | value = ast2obj_expr(state, o->v.IfExp.test); |
4330 | 449 | if (!value) goto failed; Branch (4330:13): [True: 0, False: 449]
|
4331 | 449 | if (PyObject_SetAttr(result, state->test, value) == -1) Branch (4331:13): [True: 0, False: 449]
|
4332 | 0 | goto failed; |
4333 | 449 | Py_DECREF(value); Line | Count | Source | 548 | 449 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 449 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 449 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4334 | 449 | value = ast2obj_expr(state, o->v.IfExp.body); |
4335 | 449 | if (!value) goto failed; Branch (4335:13): [True: 0, False: 449]
|
4336 | 449 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (4336:13): [True: 0, False: 449]
|
4337 | 0 | goto failed; |
4338 | 449 | Py_DECREF(value); Line | Count | Source | 548 | 449 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 449 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 449 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4339 | 449 | value = ast2obj_expr(state, o->v.IfExp.orelse); |
4340 | 449 | if (!value) goto failed; Branch (4340:13): [True: 0, False: 449]
|
4341 | 449 | if (PyObject_SetAttr(result, state->orelse, value) == -1) Branch (4341:13): [True: 0, False: 449]
|
4342 | 0 | goto failed; |
4343 | 449 | Py_DECREF(value); Line | Count | Source | 548 | 449 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 449 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 449 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4344 | 449 | break; |
4345 | 1.78k | case Dict_kind: Branch (4345:5): [True: 1.78k, False: 601k]
|
4346 | 1.78k | tp = (PyTypeObject *)state->Dict_type; |
4347 | 1.78k | result = PyType_GenericNew(tp, NULL, NULL); |
4348 | 1.78k | if (!result) goto failed; Branch (4348:13): [True: 0, False: 1.78k]
|
4349 | 1.78k | value = ast2obj_list(state, (asdl_seq*)o->v.Dict.keys, ast2obj_expr); |
4350 | 1.78k | if (!value) goto failed; Branch (4350:13): [True: 0, False: 1.78k]
|
4351 | 1.78k | if (PyObject_SetAttr(result, state->keys, value) == -1) Branch (4351:13): [True: 0, False: 1.78k]
|
4352 | 0 | goto failed; |
4353 | 1.78k | Py_DECREF(value); Line | Count | Source | 548 | 1.78k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.78k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.78k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4354 | 1.78k | value = ast2obj_list(state, (asdl_seq*)o->v.Dict.values, ast2obj_expr); |
4355 | 1.78k | if (!value) goto failed; Branch (4355:13): [True: 0, False: 1.78k]
|
4356 | 1.78k | if (PyObject_SetAttr(result, state->values, value) == -1) Branch (4356:13): [True: 0, False: 1.78k]
|
4357 | 0 | goto failed; |
4358 | 1.78k | Py_DECREF(value); Line | Count | Source | 548 | 1.78k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.78k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.78k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4359 | 1.78k | break; |
4360 | 264 | case Set_kind: Branch (4360:5): [True: 264, False: 602k]
|
4361 | 264 | tp = (PyTypeObject *)state->Set_type; |
4362 | 264 | result = PyType_GenericNew(tp, NULL, NULL); |
4363 | 264 | if (!result) goto failed; Branch (4363:13): [True: 0, False: 264]
|
4364 | 264 | value = ast2obj_list(state, (asdl_seq*)o->v.Set.elts, ast2obj_expr); |
4365 | 264 | if (!value) goto failed; Branch (4365:13): [True: 0, False: 264]
|
4366 | 264 | if (PyObject_SetAttr(result, state->elts, value) == -1) Branch (4366:13): [True: 0, False: 264]
|
4367 | 0 | goto failed; |
4368 | 264 | Py_DECREF(value); Line | Count | Source | 548 | 264 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 264 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 264 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4369 | 264 | break; |
4370 | 626 | case ListComp_kind: Branch (4370:5): [True: 626, False: 602k]
|
4371 | 626 | tp = (PyTypeObject *)state->ListComp_type; |
4372 | 626 | result = PyType_GenericNew(tp, NULL, NULL); |
4373 | 626 | if (!result) goto failed; Branch (4373:13): [True: 0, False: 626]
|
4374 | 626 | value = ast2obj_expr(state, o->v.ListComp.elt); |
4375 | 626 | if (!value) goto failed; Branch (4375:13): [True: 0, False: 626]
|
4376 | 626 | if (PyObject_SetAttr(result, state->elt, value) == -1) Branch (4376:13): [True: 0, False: 626]
|
4377 | 0 | goto failed; |
4378 | 626 | Py_DECREF(value); Line | Count | Source | 548 | 626 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 626 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 626 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4379 | 626 | value = ast2obj_list(state, (asdl_seq*)o->v.ListComp.generators, |
4380 | 626 | ast2obj_comprehension); |
4381 | 626 | if (!value) goto failed; Branch (4381:13): [True: 0, False: 626]
|
4382 | 626 | if (PyObject_SetAttr(result, state->generators, value) == -1) Branch (4382:13): [True: 0, False: 626]
|
4383 | 0 | goto failed; |
4384 | 626 | Py_DECREF(value); Line | Count | Source | 548 | 626 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 626 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 626 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4385 | 626 | break; |
4386 | 29 | case SetComp_kind: Branch (4386:5): [True: 29, False: 602k]
|
4387 | 29 | tp = (PyTypeObject *)state->SetComp_type; |
4388 | 29 | result = PyType_GenericNew(tp, NULL, NULL); |
4389 | 29 | if (!result) goto failed; Branch (4389:13): [True: 0, False: 29]
|
4390 | 29 | value = ast2obj_expr(state, o->v.SetComp.elt); |
4391 | 29 | if (!value) goto failed; Branch (4391:13): [True: 0, False: 29]
|
4392 | 29 | if (PyObject_SetAttr(result, state->elt, value) == -1) Branch (4392:13): [True: 0, False: 29]
|
4393 | 0 | goto failed; |
4394 | 29 | Py_DECREF(value); Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4395 | 29 | value = ast2obj_list(state, (asdl_seq*)o->v.SetComp.generators, |
4396 | 29 | ast2obj_comprehension); |
4397 | 29 | if (!value) goto failed; Branch (4397:13): [True: 0, False: 29]
|
4398 | 29 | if (PyObject_SetAttr(result, state->generators, value) == -1) Branch (4398:13): [True: 0, False: 29]
|
4399 | 0 | goto failed; |
4400 | 29 | Py_DECREF(value); Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4401 | 29 | break; |
4402 | 79 | case DictComp_kind: Branch (4402:5): [True: 79, False: 602k]
|
4403 | 79 | tp = (PyTypeObject *)state->DictComp_type; |
4404 | 79 | result = PyType_GenericNew(tp, NULL, NULL); |
4405 | 79 | if (!result) goto failed; Branch (4405:13): [True: 0, False: 79]
|
4406 | 79 | value = ast2obj_expr(state, o->v.DictComp.key); |
4407 | 79 | if (!value) goto failed; Branch (4407:13): [True: 0, False: 79]
|
4408 | 79 | if (PyObject_SetAttr(result, state->key, value) == -1) Branch (4408:13): [True: 0, False: 79]
|
4409 | 0 | goto failed; |
4410 | 79 | Py_DECREF(value); Line | Count | Source | 548 | 79 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 79 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 79 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4411 | 79 | value = ast2obj_expr(state, o->v.DictComp.value); |
4412 | 79 | if (!value) goto failed; Branch (4412:13): [True: 0, False: 79]
|
4413 | 79 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4413:13): [True: 0, False: 79]
|
4414 | 0 | goto failed; |
4415 | 79 | Py_DECREF(value); Line | Count | Source | 548 | 79 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 79 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 79 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4416 | 79 | value = ast2obj_list(state, (asdl_seq*)o->v.DictComp.generators, |
4417 | 79 | ast2obj_comprehension); |
4418 | 79 | if (!value) goto failed; Branch (4418:13): [True: 0, False: 79]
|
4419 | 79 | if (PyObject_SetAttr(result, state->generators, value) == -1) Branch (4419:13): [True: 0, False: 79]
|
4420 | 0 | goto failed; |
4421 | 79 | Py_DECREF(value); Line | Count | Source | 548 | 79 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 79 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 79 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4422 | 79 | break; |
4423 | 459 | case GeneratorExp_kind: Branch (4423:5): [True: 459, False: 602k]
|
4424 | 459 | tp = (PyTypeObject *)state->GeneratorExp_type; |
4425 | 459 | result = PyType_GenericNew(tp, NULL, NULL); |
4426 | 459 | if (!result) goto failed; Branch (4426:13): [True: 0, False: 459]
|
4427 | 459 | value = ast2obj_expr(state, o->v.GeneratorExp.elt); |
4428 | 459 | if (!value) goto failed; Branch (4428:13): [True: 0, False: 459]
|
4429 | 459 | if (PyObject_SetAttr(result, state->elt, value) == -1) Branch (4429:13): [True: 0, False: 459]
|
4430 | 0 | goto failed; |
4431 | 459 | Py_DECREF(value); Line | Count | Source | 548 | 459 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 459 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 459 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4432 | 459 | value = ast2obj_list(state, (asdl_seq*)o->v.GeneratorExp.generators, |
4433 | 459 | ast2obj_comprehension); |
4434 | 459 | if (!value) goto failed; Branch (4434:13): [True: 0, False: 459]
|
4435 | 459 | if (PyObject_SetAttr(result, state->generators, value) == -1) Branch (4435:13): [True: 0, False: 459]
|
4436 | 0 | goto failed; |
4437 | 459 | Py_DECREF(value); Line | Count | Source | 548 | 459 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 459 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 459 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4438 | 459 | break; |
4439 | 93 | case Await_kind: Branch (4439:5): [True: 93, False: 602k]
|
4440 | 93 | tp = (PyTypeObject *)state->Await_type; |
4441 | 93 | result = PyType_GenericNew(tp, NULL, NULL); |
4442 | 93 | if (!result) goto failed; Branch (4442:13): [True: 0, False: 93]
|
4443 | 93 | value = ast2obj_expr(state, o->v.Await.value); |
4444 | 93 | if (!value) goto failed; Branch (4444:13): [True: 0, False: 93]
|
4445 | 93 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4445:13): [True: 0, False: 93]
|
4446 | 0 | goto failed; |
4447 | 93 | Py_DECREF(value); Line | Count | Source | 548 | 93 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 93 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 93 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4448 | 93 | break; |
4449 | 474 | case Yield_kind: Branch (4449:5): [True: 474, False: 602k]
|
4450 | 474 | tp = (PyTypeObject *)state->Yield_type; |
4451 | 474 | result = PyType_GenericNew(tp, NULL, NULL); |
4452 | 474 | if (!result) goto failed; Branch (4452:13): [True: 0, False: 474]
|
4453 | 474 | value = ast2obj_expr(state, o->v.Yield.value); |
4454 | 474 | if (!value) goto failed; Branch (4454:13): [True: 0, False: 474]
|
4455 | 474 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4455:13): [True: 0, False: 474]
|
4456 | 0 | goto failed; |
4457 | 474 | Py_DECREF(value); Line | Count | Source | 548 | 474 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 474 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 474 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4458 | 474 | break; |
4459 | 101 | case YieldFrom_kind: Branch (4459:5): [True: 101, False: 602k]
|
4460 | 101 | tp = (PyTypeObject *)state->YieldFrom_type; |
4461 | 101 | result = PyType_GenericNew(tp, NULL, NULL); |
4462 | 101 | if (!result) goto failed; Branch (4462:13): [True: 0, False: 101]
|
4463 | 101 | value = ast2obj_expr(state, o->v.YieldFrom.value); |
4464 | 101 | if (!value) goto failed; Branch (4464:13): [True: 0, False: 101]
|
4465 | 101 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4465:13): [True: 0, False: 101]
|
4466 | 0 | goto failed; |
4467 | 101 | Py_DECREF(value); Line | Count | Source | 548 | 101 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 101 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 101 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4468 | 101 | break; |
4469 | 12.3k | case Compare_kind: Branch (4469:5): [True: 12.3k, False: 590k]
|
4470 | 12.3k | tp = (PyTypeObject *)state->Compare_type; |
4471 | 12.3k | result = PyType_GenericNew(tp, NULL, NULL); |
4472 | 12.3k | if (!result) goto failed; Branch (4472:13): [True: 0, False: 12.3k]
|
4473 | 12.3k | value = ast2obj_expr(state, o->v.Compare.left); |
4474 | 12.3k | if (!value) goto failed; Branch (4474:13): [True: 0, False: 12.3k]
|
4475 | 12.3k | if (PyObject_SetAttr(result, state->left, value) == -1) Branch (4475:13): [True: 0, False: 12.3k]
|
4476 | 0 | goto failed; |
4477 | 12.3k | Py_DECREF(value); Line | Count | Source | 548 | 12.3k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4478 | 12.3k | { |
4479 | 12.3k | Py_ssize_t i, n = asdl_seq_LEN(o->v.Compare.ops); Line | Count | Source | 83 | 12.3k | #define asdl_seq_LEN(S) _Py_RVALUE(((S) == NULL ? 0 : (S)->size)) Line | Count | Source | 153 | 24.7k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) Branch (153:37): [True: 0, False: 12.3k]
|
|
|
4480 | 12.3k | value = PyList_New(n); |
4481 | 12.3k | if (!value) goto failed; Branch (4481:17): [True: 0, False: 12.3k]
|
4482 | 24.9k | for(i = 0; i < n; i++) Branch (4482:24): [True: 12.5k, False: 12.3k]
|
4483 | 12.5k | PyList_SET_ITEM(value, i, ast2obj_cmpop(state, (cmpop_ty)asdl_seq_GET(o->v.Compare.ops, i))); Line | Count | Source | 47 | 24.9k | PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 12.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value)) Line | Count | Source | 109 | 12.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4484 | 12.3k | } |
4485 | 12.3k | if (!value) goto failed; Branch (4485:13): [True: 0, False: 12.3k]
|
4486 | 12.3k | if (PyObject_SetAttr(result, state->ops, value) == -1) Branch (4486:13): [True: 0, False: 12.3k]
|
4487 | 0 | goto failed; |
4488 | 12.3k | Py_DECREF(value); Line | Count | Source | 548 | 12.3k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4489 | 12.3k | value = ast2obj_list(state, (asdl_seq*)o->v.Compare.comparators, |
4490 | 12.3k | ast2obj_expr); |
4491 | 12.3k | if (!value) goto failed; Branch (4491:13): [True: 0, False: 12.3k]
|
4492 | 12.3k | if (PyObject_SetAttr(result, state->comparators, value) == -1) Branch (4492:13): [True: 0, False: 12.3k]
|
4493 | 0 | goto failed; |
4494 | 12.3k | Py_DECREF(value); Line | Count | Source | 548 | 12.3k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4495 | 12.3k | break; |
4496 | 73.6k | case Call_kind: Branch (4496:5): [True: 73.6k, False: 529k]
|
4497 | 73.6k | tp = (PyTypeObject *)state->Call_type; |
4498 | 73.6k | result = PyType_GenericNew(tp, NULL, NULL); |
4499 | 73.6k | if (!result) goto failed; Branch (4499:13): [True: 0, False: 73.6k]
|
4500 | 73.6k | value = ast2obj_expr(state, o->v.Call.func); |
4501 | 73.6k | if (!value) goto failed; Branch (4501:13): [True: 0, False: 73.6k]
|
4502 | 73.6k | if (PyObject_SetAttr(result, state->func, value) == -1) Branch (4502:13): [True: 0, False: 73.6k]
|
4503 | 0 | goto failed; |
4504 | 73.6k | Py_DECREF(value); Line | Count | Source | 548 | 73.6k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 73.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 73.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4505 | 73.6k | value = ast2obj_list(state, (asdl_seq*)o->v.Call.args, ast2obj_expr); |
4506 | 73.6k | if (!value) goto failed; Branch (4506:13): [True: 0, False: 73.6k]
|
4507 | 73.6k | if (PyObject_SetAttr(result, state->args, value) == -1) Branch (4507:13): [True: 0, False: 73.6k]
|
4508 | 0 | goto failed; |
4509 | 73.6k | Py_DECREF(value); Line | Count | Source | 548 | 73.6k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 73.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 73.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4510 | 73.6k | value = ast2obj_list(state, (asdl_seq*)o->v.Call.keywords, |
4511 | 73.6k | ast2obj_keyword); |
4512 | 73.6k | if (!value) goto failed; Branch (4512:13): [True: 0, False: 73.6k]
|
4513 | 73.6k | if (PyObject_SetAttr(result, state->keywords, value) == -1) Branch (4513:13): [True: 0, False: 73.6k]
|
4514 | 0 | goto failed; |
4515 | 73.6k | Py_DECREF(value); Line | Count | Source | 548 | 73.6k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 73.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 73.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4516 | 73.6k | break; |
4517 | 1.73k | case FormattedValue_kind: Branch (4517:5): [True: 1.73k, False: 601k]
|
4518 | 1.73k | tp = (PyTypeObject *)state->FormattedValue_type; |
4519 | 1.73k | result = PyType_GenericNew(tp, NULL, NULL); |
4520 | 1.73k | if (!result) goto failed; Branch (4520:13): [True: 0, False: 1.73k]
|
4521 | 1.73k | value = ast2obj_expr(state, o->v.FormattedValue.value); |
4522 | 1.73k | if (!value) goto failed; Branch (4522:13): [True: 0, False: 1.73k]
|
4523 | 1.73k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4523:13): [True: 0, False: 1.73k]
|
4524 | 0 | goto failed; |
4525 | 1.73k | Py_DECREF(value); Line | Count | Source | 548 | 1.73k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.73k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.73k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4526 | 1.73k | value = ast2obj_int(state, o->v.FormattedValue.conversion); |
4527 | 1.73k | if (!value) goto failed; Branch (4527:13): [True: 0, False: 1.73k]
|
4528 | 1.73k | if (PyObject_SetAttr(result, state->conversion, value) == -1) Branch (4528:13): [True: 0, False: 1.73k]
|
4529 | 0 | goto failed; |
4530 | 1.73k | Py_DECREF(value); Line | Count | Source | 548 | 1.73k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.73k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.73k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4531 | 1.73k | value = ast2obj_expr(state, o->v.FormattedValue.format_spec); |
4532 | 1.73k | if (!value) goto failed; Branch (4532:13): [True: 0, False: 1.73k]
|
4533 | 1.73k | if (PyObject_SetAttr(result, state->format_spec, value) == -1) Branch (4533:13): [True: 0, False: 1.73k]
|
4534 | 0 | goto failed; |
4535 | 1.73k | Py_DECREF(value); Line | Count | Source | 548 | 1.73k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.73k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.73k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4536 | 1.73k | break; |
4537 | 1.53k | case JoinedStr_kind: Branch (4537:5): [True: 1.53k, False: 601k]
|
4538 | 1.53k | tp = (PyTypeObject *)state->JoinedStr_type; |
4539 | 1.53k | result = PyType_GenericNew(tp, NULL, NULL); |
4540 | 1.53k | if (!result) goto failed; Branch (4540:13): [True: 0, False: 1.53k]
|
4541 | 1.53k | value = ast2obj_list(state, (asdl_seq*)o->v.JoinedStr.values, |
4542 | 1.53k | ast2obj_expr); |
4543 | 1.53k | if (!value) goto failed; Branch (4543:13): [True: 0, False: 1.53k]
|
4544 | 1.53k | if (PyObject_SetAttr(result, state->values, value) == -1) Branch (4544:13): [True: 0, False: 1.53k]
|
4545 | 0 | goto failed; |
4546 | 1.53k | Py_DECREF(value); Line | Count | Source | 548 | 1.53k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.53k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.53k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4547 | 1.53k | break; |
4548 | 114k | case Constant_kind: Branch (4548:5): [True: 114k, False: 488k]
|
4549 | 114k | tp = (PyTypeObject *)state->Constant_type; |
4550 | 114k | result = PyType_GenericNew(tp, NULL, NULL); |
4551 | 114k | if (!result) goto failed; Branch (4551:13): [True: 0, False: 114k]
|
4552 | 114k | value = ast2obj_constant(state, o->v.Constant.value); Line | Count | Source | 1001 | 114k | #define ast2obj_constant ast2obj_object |
|
4553 | 114k | if (!value) goto failed; Branch (4553:13): [True: 0, False: 114k]
|
4554 | 114k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4554:13): [True: 0, False: 114k]
|
4555 | 0 | goto failed; |
4556 | 114k | Py_DECREF(value); Line | Count | Source | 548 | 114k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 114k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 114k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4557 | 114k | value = ast2obj_string(state, o->v.Constant.kind); Line | Count | Source | 1003 | 114k | #define ast2obj_string ast2obj_object |
|
4558 | 114k | if (!value) goto failed; Branch (4558:13): [True: 0, False: 114k]
|
4559 | 114k | if (PyObject_SetAttr(result, state->kind, value) == -1) Branch (4559:13): [True: 0, False: 114k]
|
4560 | 0 | goto failed; |
4561 | 114k | Py_DECREF(value); Line | Count | Source | 548 | 114k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 114k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 114k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4562 | 114k | break; |
4563 | 79.8k | case Attribute_kind: Branch (4563:5): [True: 79.8k, False: 523k]
|
4564 | 79.8k | tp = (PyTypeObject *)state->Attribute_type; |
4565 | 79.8k | result = PyType_GenericNew(tp, NULL, NULL); |
4566 | 79.8k | if (!result) goto failed; Branch (4566:13): [True: 0, False: 79.8k]
|
4567 | 79.8k | value = ast2obj_expr(state, o->v.Attribute.value); |
4568 | 79.8k | if (!value) goto failed; Branch (4568:13): [True: 0, False: 79.8k]
|
4569 | 79.8k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4569:13): [True: 0, False: 79.8k]
|
4570 | 0 | goto failed; |
4571 | 79.8k | Py_DECREF(value); Line | Count | Source | 548 | 79.8k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 79.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 79.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4572 | 79.8k | value = ast2obj_identifier(state, o->v.Attribute.attr); Line | Count | Source | 1002 | 79.8k | #define ast2obj_identifier ast2obj_object |
|
4573 | 79.8k | if (!value) goto failed; Branch (4573:13): [True: 0, False: 79.8k]
|
4574 | 79.8k | if (PyObject_SetAttr(result, state->attr, value) == -1) Branch (4574:13): [True: 0, False: 79.8k]
|
4575 | 0 | goto failed; |
4576 | 79.8k | Py_DECREF(value); Line | Count | Source | 548 | 79.8k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 79.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 79.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4577 | 79.8k | value = ast2obj_expr_context(state, o->v.Attribute.ctx); |
4578 | 79.8k | if (!value) goto failed; Branch (4578:13): [True: 0, False: 79.8k]
|
4579 | 79.8k | if (PyObject_SetAttr(result, state->ctx, value) == -1) Branch (4579:13): [True: 0, False: 79.8k]
|
4580 | 0 | goto failed; |
4581 | 79.8k | Py_DECREF(value); Line | Count | Source | 548 | 79.8k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 79.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 79.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4582 | 79.8k | break; |
4583 | 9.27k | case Subscript_kind: Branch (4583:5): [True: 9.27k, False: 593k]
|
4584 | 9.27k | tp = (PyTypeObject *)state->Subscript_type; |
4585 | 9.27k | result = PyType_GenericNew(tp, NULL, NULL); |
4586 | 9.27k | if (!result) goto failed; Branch (4586:13): [True: 0, False: 9.27k]
|
4587 | 9.27k | value = ast2obj_expr(state, o->v.Subscript.value); |
4588 | 9.27k | if (!value) goto failed; Branch (4588:13): [True: 0, False: 9.27k]
|
4589 | 9.27k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4589:13): [True: 0, False: 9.27k]
|
4590 | 0 | goto failed; |
4591 | 9.27k | Py_DECREF(value); Line | Count | Source | 548 | 9.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4592 | 9.27k | value = ast2obj_expr(state, o->v.Subscript.slice); |
4593 | 9.27k | if (!value) goto failed; Branch (4593:13): [True: 0, False: 9.27k]
|
4594 | 9.27k | if (PyObject_SetAttr(result, state->slice, value) == -1) Branch (4594:13): [True: 0, False: 9.27k]
|
4595 | 0 | goto failed; |
4596 | 9.27k | Py_DECREF(value); Line | Count | Source | 548 | 9.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4597 | 9.27k | value = ast2obj_expr_context(state, o->v.Subscript.ctx); |
4598 | 9.27k | if (!value) goto failed; Branch (4598:13): [True: 0, False: 9.27k]
|
4599 | 9.27k | if (PyObject_SetAttr(result, state->ctx, value) == -1) Branch (4599:13): [True: 0, False: 9.27k]
|
4600 | 0 | goto failed; |
4601 | 9.27k | Py_DECREF(value); Line | Count | Source | 548 | 9.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4602 | 9.27k | break; |
4603 | 791 | case Starred_kind: Branch (4603:5): [True: 791, False: 602k]
|
4604 | 791 | tp = (PyTypeObject *)state->Starred_type; |
4605 | 791 | result = PyType_GenericNew(tp, NULL, NULL); |
4606 | 791 | if (!result) goto failed; Branch (4606:13): [True: 0, False: 791]
|
4607 | 791 | value = ast2obj_expr(state, o->v.Starred.value); |
4608 | 791 | if (!value) goto failed; Branch (4608:13): [True: 0, False: 791]
|
4609 | 791 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (4609:13): [True: 0, False: 791]
|
4610 | 0 | goto failed; |
4611 | 791 | Py_DECREF(value); Line | Count | Source | 548 | 791 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 791 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 791 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4612 | 791 | value = ast2obj_expr_context(state, o->v.Starred.ctx); |
4613 | 791 | if (!value) goto failed; Branch (4613:13): [True: 0, False: 791]
|
4614 | 791 | if (PyObject_SetAttr(result, state->ctx, value) == -1) Branch (4614:13): [True: 0, False: 791]
|
4615 | 0 | goto failed; |
4616 | 791 | Py_DECREF(value); Line | Count | Source | 548 | 791 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 791 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 791 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4617 | 791 | break; |
4618 | 262k | case Name_kind: Branch (4618:5): [True: 262k, False: 340k]
|
4619 | 262k | tp = (PyTypeObject *)state->Name_type; |
4620 | 262k | result = PyType_GenericNew(tp, NULL, NULL); |
4621 | 262k | if (!result) goto failed; Branch (4621:13): [True: 0, False: 262k]
|
4622 | 262k | value = ast2obj_identifier(state, o->v.Name.id); Line | Count | Source | 1002 | 262k | #define ast2obj_identifier ast2obj_object |
|
4623 | 262k | if (!value) goto failed; Branch (4623:13): [True: 0, False: 262k]
|
4624 | 262k | if (PyObject_SetAttr(result, state->id, value) == -1) Branch (4624:13): [True: 0, False: 262k]
|
4625 | 0 | goto failed; |
4626 | 262k | Py_DECREF(value); Line | Count | Source | 548 | 262k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 262k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 262k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4627 | 262k | value = ast2obj_expr_context(state, o->v.Name.ctx); |
4628 | 262k | if (!value) goto failed; Branch (4628:13): [True: 0, False: 262k]
|
4629 | 262k | if (PyObject_SetAttr(result, state->ctx, value) == -1) Branch (4629:13): [True: 0, False: 262k]
|
4630 | 0 | goto failed; |
4631 | 262k | Py_DECREF(value); Line | Count | Source | 548 | 262k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 262k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 262k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4632 | 262k | break; |
4633 | 5.24k | case List_kind: Branch (4633:5): [True: 5.24k, False: 597k]
|
4634 | 5.24k | tp = (PyTypeObject *)state->List_type; |
4635 | 5.24k | result = PyType_GenericNew(tp, NULL, NULL); |
4636 | 5.24k | if (!result) goto failed; Branch (4636:13): [True: 0, False: 5.24k]
|
4637 | 5.24k | value = ast2obj_list(state, (asdl_seq*)o->v.List.elts, ast2obj_expr); |
4638 | 5.24k | if (!value) goto failed; Branch (4638:13): [True: 0, False: 5.24k]
|
4639 | 5.24k | if (PyObject_SetAttr(result, state->elts, value) == -1) Branch (4639:13): [True: 0, False: 5.24k]
|
4640 | 0 | goto failed; |
4641 | 5.24k | Py_DECREF(value); Line | Count | Source | 548 | 5.24k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4642 | 5.24k | value = ast2obj_expr_context(state, o->v.List.ctx); |
4643 | 5.24k | if (!value) goto failed; Branch (4643:13): [True: 0, False: 5.24k]
|
4644 | 5.24k | if (PyObject_SetAttr(result, state->ctx, value) == -1) Branch (4644:13): [True: 0, False: 5.24k]
|
4645 | 0 | goto failed; |
4646 | 5.24k | Py_DECREF(value); Line | Count | Source | 548 | 5.24k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4647 | 5.24k | break; |
4648 | 13.9k | case Tuple_kind: Branch (4648:5): [True: 13.9k, False: 589k]
|
4649 | 13.9k | tp = (PyTypeObject *)state->Tuple_type; |
4650 | 13.9k | result = PyType_GenericNew(tp, NULL, NULL); |
4651 | 13.9k | if (!result) goto failed; Branch (4651:13): [True: 0, False: 13.9k]
|
4652 | 13.9k | value = ast2obj_list(state, (asdl_seq*)o->v.Tuple.elts, ast2obj_expr); |
4653 | 13.9k | if (!value) goto failed; Branch (4653:13): [True: 0, False: 13.9k]
|
4654 | 13.9k | if (PyObject_SetAttr(result, state->elts, value) == -1) Branch (4654:13): [True: 0, False: 13.9k]
|
4655 | 0 | goto failed; |
4656 | 13.9k | Py_DECREF(value); Line | Count | Source | 548 | 13.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 13.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 13.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4657 | 13.9k | value = ast2obj_expr_context(state, o->v.Tuple.ctx); |
4658 | 13.9k | if (!value) goto failed; Branch (4658:13): [True: 0, False: 13.9k]
|
4659 | 13.9k | if (PyObject_SetAttr(result, state->ctx, value) == -1) Branch (4659:13): [True: 0, False: 13.9k]
|
4660 | 0 | goto failed; |
4661 | 13.9k | Py_DECREF(value); Line | Count | Source | 548 | 13.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 13.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 13.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4662 | 13.9k | break; |
4663 | 1.93k | case Slice_kind: Branch (4663:5): [True: 1.93k, False: 601k]
|
4664 | 1.93k | tp = (PyTypeObject *)state->Slice_type; |
4665 | 1.93k | result = PyType_GenericNew(tp, NULL, NULL); |
4666 | 1.93k | if (!result) goto failed; Branch (4666:13): [True: 0, False: 1.93k]
|
4667 | 1.93k | value = ast2obj_expr(state, o->v.Slice.lower); |
4668 | 1.93k | if (!value) goto failed; Branch (4668:13): [True: 0, False: 1.93k]
|
4669 | 1.93k | if (PyObject_SetAttr(result, state->lower, value) == -1) Branch (4669:13): [True: 0, False: 1.93k]
|
4670 | 0 | goto failed; |
4671 | 1.93k | Py_DECREF(value); Line | Count | Source | 548 | 1.93k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.93k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.93k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4672 | 1.93k | value = ast2obj_expr(state, o->v.Slice.upper); |
4673 | 1.93k | if (!value) goto failed; Branch (4673:13): [True: 0, False: 1.93k]
|
4674 | 1.93k | if (PyObject_SetAttr(result, state->upper, value) == -1) Branch (4674:13): [True: 0, False: 1.93k]
|
4675 | 0 | goto failed; |
4676 | 1.93k | Py_DECREF(value); Line | Count | Source | 548 | 1.93k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.93k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.93k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4677 | 1.93k | value = ast2obj_expr(state, o->v.Slice.step); |
4678 | 1.93k | if (!value) goto failed; Branch (4678:13): [True: 0, False: 1.93k]
|
4679 | 1.93k | if (PyObject_SetAttr(result, state->step, value) == -1) Branch (4679:13): [True: 0, False: 1.93k]
|
4680 | 0 | goto failed; |
4681 | 1.93k | Py_DECREF(value); Line | Count | Source | 548 | 1.93k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.93k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.93k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4682 | 1.93k | break; |
4683 | 603k | } |
4684 | 603k | value = ast2obj_int(state, o->lineno); |
4685 | 603k | if (!value) goto failed; Branch (4685:9): [True: 0, False: 603k]
|
4686 | 603k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (4686:9): [True: 0, False: 603k]
|
4687 | 0 | goto failed; |
4688 | 603k | Py_DECREF(value); Line | Count | Source | 548 | 603k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 603k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 603k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4689 | 603k | value = ast2obj_int(state, o->col_offset); |
4690 | 603k | if (!value) goto failed; Branch (4690:9): [True: 0, False: 603k]
|
4691 | 603k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (4691:9): [True: 0, False: 603k]
|
4692 | 0 | goto failed; |
4693 | 603k | Py_DECREF(value); Line | Count | Source | 548 | 603k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 603k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 603k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4694 | 603k | value = ast2obj_int(state, o->end_lineno); |
4695 | 603k | if (!value) goto failed; Branch (4695:9): [True: 0, False: 603k]
|
4696 | 603k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (4696:9): [True: 0, False: 603k]
|
4697 | 0 | goto failed; |
4698 | 603k | Py_DECREF(value); Line | Count | Source | 548 | 603k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 603k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 603k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4699 | 603k | value = ast2obj_int(state, o->end_col_offset); |
4700 | 603k | if (!value) goto failed; Branch (4700:9): [True: 0, False: 603k]
|
4701 | 603k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (4701:9): [True: 0, False: 603k]
|
4702 | 0 | goto failed; |
4703 | 603k | Py_DECREF(value); Line | Count | Source | 548 | 603k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 603k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 603k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4704 | 603k | return result; |
4705 | 0 | failed: |
4706 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4707 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4708 | 0 | return NULL; |
4709 | 603k | } |
4710 | | |
4711 | | PyObject* ast2obj_expr_context(struct ast_state *state, expr_context_ty o) |
4712 | 371k | { |
4713 | 371k | switch(o) { Branch (4713:12): [True: 0, False: 371k]
|
4714 | 307k | case Load: Branch (4714:9): [True: 307k, False: 64.6k]
|
4715 | 307k | Py_INCREF(state->Load_singleton); Line | Count | Source | 512 | 307k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 307k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 307k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4716 | 307k | return state->Load_singleton; |
4717 | 63.9k | case Store: Branch (4717:9): [True: 63.9k, False: 307k]
|
4718 | 63.9k | Py_INCREF(state->Store_singleton); Line | Count | Source | 512 | 63.9k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 63.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 63.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4719 | 63.9k | return state->Store_singleton; |
4720 | 671 | case Del: Branch (4720:9): [True: 671, False: 371k]
|
4721 | 671 | Py_INCREF(state->Del_singleton); Line | Count | Source | 512 | 671 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 671 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 671 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4722 | 671 | return state->Del_singleton; |
4723 | 371k | } |
4724 | 371k | Py_UNREACHABLE(); Line | Count | Source | 143 | 0 | # define Py_UNREACHABLE() __builtin_unreachable() |
|
4725 | 371k | } |
4726 | | PyObject* ast2obj_boolop(struct ast_state *state, boolop_ty o) |
4727 | 3.45k | { |
4728 | 3.45k | switch(o) { Branch (4728:12): [True: 0, False: 3.45k]
|
4729 | 2.17k | case And: Branch (4729:9): [True: 2.17k, False: 1.28k]
|
4730 | 2.17k | Py_INCREF(state->And_singleton); Line | Count | Source | 512 | 2.17k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4731 | 2.17k | return state->And_singleton; |
4732 | 1.28k | case Or: Branch (4732:9): [True: 1.28k, False: 2.17k]
|
4733 | 1.28k | Py_INCREF(state->Or_singleton); Line | Count | Source | 512 | 1.28k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.28k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.28k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4734 | 1.28k | return state->Or_singleton; |
4735 | 3.45k | } |
4736 | 3.45k | Py_UNREACHABLE(); Line | Count | Source | 143 | 0 | # define Py_UNREACHABLE() __builtin_unreachable() |
|
4737 | 3.45k | } |
4738 | | PyObject* ast2obj_operator(struct ast_state *state, operator_ty o) |
4739 | 13.5k | { |
4740 | 13.5k | switch(o) { Branch (4740:12): [True: 0, False: 13.5k]
|
4741 | 5.46k | case Add: Branch (4741:9): [True: 5.46k, False: 8.09k]
|
4742 | 5.46k | Py_INCREF(state->Add_singleton); Line | Count | Source | 512 | 5.46k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5.46k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.46k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4743 | 5.46k | return state->Add_singleton; |
4744 | 1.44k | case Sub: Branch (4744:9): [True: 1.44k, False: 12.1k]
|
4745 | 1.44k | Py_INCREF(state->Sub_singleton); Line | Count | Source | 512 | 1.44k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.44k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.44k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4746 | 1.44k | return state->Sub_singleton; |
4747 | 1.21k | case Mult: Branch (4747:9): [True: 1.21k, False: 12.3k]
|
4748 | 1.21k | Py_INCREF(state->Mult_singleton); Line | Count | Source | 512 | 1.21k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4749 | 1.21k | return state->Mult_singleton; |
4750 | 19 | case MatMult: Branch (4750:9): [True: 19, False: 13.5k]
|
4751 | 19 | Py_INCREF(state->MatMult_singleton); Line | Count | Source | 512 | 19 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4752 | 19 | return state->MatMult_singleton; |
4753 | 1.27k | case Div: Branch (4753:9): [True: 1.27k, False: 12.2k]
|
4754 | 1.27k | Py_INCREF(state->Div_singleton); Line | Count | Source | 512 | 1.27k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4755 | 1.27k | return state->Div_singleton; |
4756 | 2.43k | case Mod: Branch (4756:9): [True: 2.43k, False: 11.1k]
|
4757 | 2.43k | Py_INCREF(state->Mod_singleton); Line | Count | Source | 512 | 2.43k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.43k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.43k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4758 | 2.43k | return state->Mod_singleton; |
4759 | 189 | case Pow: Branch (4759:9): [True: 189, False: 13.3k]
|
4760 | 189 | Py_INCREF(state->Pow_singleton); Line | Count | Source | 512 | 189 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 189 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 189 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4761 | 189 | return state->Pow_singleton; |
4762 | 206 | case LShift: Branch (4762:9): [True: 206, False: 13.3k]
|
4763 | 206 | Py_INCREF(state->LShift_singleton); Line | Count | Source | 512 | 206 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 206 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 206 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4764 | 206 | return state->LShift_singleton; |
4765 | 101 | case RShift: Branch (4765:9): [True: 101, False: 13.4k]
|
4766 | 101 | Py_INCREF(state->RShift_singleton); Line | Count | Source | 512 | 101 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 101 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 101 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4767 | 101 | return state->RShift_singleton; |
4768 | 452 | case BitOr: Branch (4768:9): [True: 452, False: 13.1k]
|
4769 | 452 | Py_INCREF(state->BitOr_singleton); Line | Count | Source | 512 | 452 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 452 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 452 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4770 | 452 | return state->BitOr_singleton; |
4771 | 105 | case BitXor: Branch (4771:9): [True: 105, False: 13.4k]
|
4772 | 105 | Py_INCREF(state->BitXor_singleton); Line | Count | Source | 512 | 105 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 105 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 105 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4773 | 105 | return state->BitXor_singleton; |
4774 | 417 | case BitAnd: Branch (4774:9): [True: 417, False: 13.1k]
|
4775 | 417 | Py_INCREF(state->BitAnd_singleton); Line | Count | Source | 512 | 417 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 417 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 417 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4776 | 417 | return state->BitAnd_singleton; |
4777 | 237 | case FloorDiv: Branch (4777:9): [True: 237, False: 13.3k]
|
4778 | 237 | Py_INCREF(state->FloorDiv_singleton); Line | Count | Source | 512 | 237 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 237 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 237 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4779 | 237 | return state->FloorDiv_singleton; |
4780 | 13.5k | } |
4781 | 13.5k | Py_UNREACHABLE(); Line | Count | Source | 143 | 0 | # define Py_UNREACHABLE() __builtin_unreachable() |
|
4782 | 13.5k | } |
4783 | | PyObject* ast2obj_unaryop(struct ast_state *state, unaryop_ty o) |
4784 | 4.67k | { |
4785 | 4.67k | switch(o) { Branch (4785:12): [True: 0, False: 4.67k]
|
4786 | 87 | case Invert: Branch (4786:9): [True: 87, False: 4.58k]
|
4787 | 87 | Py_INCREF(state->Invert_singleton); Line | Count | Source | 512 | 87 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 87 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 87 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4788 | 87 | return state->Invert_singleton; |
4789 | 2.68k | case Not: Branch (4789:9): [True: 2.68k, False: 1.98k]
|
4790 | 2.68k | Py_INCREF(state->Not_singleton); Line | Count | Source | 512 | 2.68k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.68k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.68k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4791 | 2.68k | return state->Not_singleton; |
4792 | 44 | case UAdd: Branch (4792:9): [True: 44, False: 4.62k]
|
4793 | 44 | Py_INCREF(state->UAdd_singleton); Line | Count | Source | 512 | 44 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 44 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 44 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4794 | 44 | return state->UAdd_singleton; |
4795 | 1.85k | case USub: Branch (4795:9): [True: 1.85k, False: 2.81k]
|
4796 | 1.85k | Py_INCREF(state->USub_singleton); Line | Count | Source | 512 | 1.85k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.85k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.85k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4797 | 1.85k | return state->USub_singleton; |
4798 | 4.67k | } |
4799 | 4.67k | Py_UNREACHABLE(); Line | Count | Source | 143 | 0 | # define Py_UNREACHABLE() __builtin_unreachable() |
|
4800 | 4.67k | } |
4801 | | PyObject* ast2obj_cmpop(struct ast_state *state, cmpop_ty o) |
4802 | 12.5k | { |
4803 | 12.5k | switch(o) { Branch (4803:12): [True: 0, False: 12.5k]
|
4804 | 3.36k | case Eq: Branch (4804:9): [True: 3.36k, False: 9.20k]
|
4805 | 3.36k | Py_INCREF(state->Eq_singleton); Line | Count | Source | 512 | 3.36k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.36k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.36k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4806 | 3.36k | return state->Eq_singleton; |
4807 | 885 | case NotEq: Branch (4807:9): [True: 885, False: 11.6k]
|
4808 | 885 | Py_INCREF(state->NotEq_singleton); Line | Count | Source | 512 | 885 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 885 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 885 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4809 | 885 | return state->NotEq_singleton; |
4810 | 846 | case Lt: Branch (4810:9): [True: 846, False: 11.7k]
|
4811 | 846 | Py_INCREF(state->Lt_singleton); Line | Count | Source | 512 | 846 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 846 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 846 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4812 | 846 | return state->Lt_singleton; |
4813 | 464 | case LtE: Branch (4813:9): [True: 464, False: 12.1k]
|
4814 | 464 | Py_INCREF(state->LtE_singleton); Line | Count | Source | 512 | 464 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 464 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 464 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4815 | 464 | return state->LtE_singleton; |
4816 | 715 | case Gt: Branch (4816:9): [True: 715, False: 11.8k]
|
4817 | 715 | Py_INCREF(state->Gt_singleton); Line | Count | Source | 512 | 715 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 715 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 715 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4818 | 715 | return state->Gt_singleton; |
4819 | 419 | case GtE: Branch (4819:9): [True: 419, False: 12.1k]
|
4820 | 419 | Py_INCREF(state->GtE_singleton); Line | Count | Source | 512 | 419 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 419 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 419 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4821 | 419 | return state->GtE_singleton; |
4822 | 2.25k | case Is: Branch (4822:9): [True: 2.25k, False: 10.3k]
|
4823 | 2.25k | Py_INCREF(state->Is_singleton); Line | Count | Source | 512 | 2.25k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4824 | 2.25k | return state->Is_singleton; |
4825 | 1.49k | case IsNot: Branch (4825:9): [True: 1.49k, False: 11.0k]
|
4826 | 1.49k | Py_INCREF(state->IsNot_singleton); Line | Count | Source | 512 | 1.49k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.49k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.49k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4827 | 1.49k | return state->IsNot_singleton; |
4828 | 1.63k | case In: Branch (4828:9): [True: 1.63k, False: 10.9k]
|
4829 | 1.63k | Py_INCREF(state->In_singleton); Line | Count | Source | 512 | 1.63k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4830 | 1.63k | return state->In_singleton; |
4831 | 492 | case NotIn: Branch (4831:9): [True: 492, False: 12.0k]
|
4832 | 492 | Py_INCREF(state->NotIn_singleton); Line | Count | Source | 512 | 492 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 492 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 492 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4833 | 492 | return state->NotIn_singleton; |
4834 | 12.5k | } |
4835 | 12.5k | Py_UNREACHABLE(); Line | Count | Source | 143 | 0 | # define Py_UNREACHABLE() __builtin_unreachable() |
|
4836 | 12.5k | } |
4837 | | PyObject* |
4838 | | ast2obj_comprehension(struct ast_state *state, void* _o) |
4839 | 1.25k | { |
4840 | 1.25k | comprehension_ty o = (comprehension_ty)_o; |
4841 | 1.25k | PyObject *result = NULL, *value = NULL; |
4842 | 1.25k | PyTypeObject *tp; |
4843 | 1.25k | if (!o) { Branch (4843:9): [True: 0, False: 1.25k]
|
4844 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
4845 | 0 | } |
4846 | 1.25k | tp = (PyTypeObject *)state->comprehension_type; |
4847 | 1.25k | result = PyType_GenericNew(tp, NULL, NULL); |
4848 | 1.25k | if (!result) return NULL; Branch (4848:9): [True: 0, False: 1.25k]
|
4849 | 1.25k | value = ast2obj_expr(state, o->target); |
4850 | 1.25k | if (!value) goto failed; Branch (4850:9): [True: 0, False: 1.25k]
|
4851 | 1.25k | if (PyObject_SetAttr(result, state->target, value) == -1) Branch (4851:9): [True: 0, False: 1.25k]
|
4852 | 0 | goto failed; |
4853 | 1.25k | Py_DECREF(value); Line | Count | Source | 548 | 1.25k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4854 | 1.25k | value = ast2obj_expr(state, o->iter); |
4855 | 1.25k | if (!value) goto failed; Branch (4855:9): [True: 0, False: 1.25k]
|
4856 | 1.25k | if (PyObject_SetAttr(result, state->iter, value) == -1) Branch (4856:9): [True: 0, False: 1.25k]
|
4857 | 0 | goto failed; |
4858 | 1.25k | Py_DECREF(value); Line | Count | Source | 548 | 1.25k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4859 | 1.25k | value = ast2obj_list(state, (asdl_seq*)o->ifs, ast2obj_expr); |
4860 | 1.25k | if (!value) goto failed; Branch (4860:9): [True: 0, False: 1.25k]
|
4861 | 1.25k | if (PyObject_SetAttr(result, state->ifs, value) == -1) Branch (4861:9): [True: 0, False: 1.25k]
|
4862 | 0 | goto failed; |
4863 | 1.25k | Py_DECREF(value); Line | Count | Source | 548 | 1.25k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4864 | 1.25k | value = ast2obj_int(state, o->is_async); |
4865 | 1.25k | if (!value) goto failed; Branch (4865:9): [True: 0, False: 1.25k]
|
4866 | 1.25k | if (PyObject_SetAttr(result, state->is_async, value) == -1) Branch (4866:9): [True: 0, False: 1.25k]
|
4867 | 0 | goto failed; |
4868 | 1.25k | Py_DECREF(value); Line | Count | Source | 548 | 1.25k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.25k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.25k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4869 | 1.25k | return result; |
4870 | 0 | failed: |
4871 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4872 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4873 | 0 | return NULL; |
4874 | 1.25k | } |
4875 | | |
4876 | | PyObject* |
4877 | | ast2obj_excepthandler(struct ast_state *state, void* _o) |
4878 | 2.21k | { |
4879 | 2.21k | excepthandler_ty o = (excepthandler_ty)_o; |
4880 | 2.21k | PyObject *result = NULL, *value = NULL; |
4881 | 2.21k | PyTypeObject *tp; |
4882 | 2.21k | if (!o) { Branch (4882:9): [True: 0, False: 2.21k]
|
4883 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
4884 | 0 | } |
4885 | 2.21k | switch (o->kind) { Branch (4885:13): [True: 0, False: 2.21k]
|
4886 | 2.21k | case ExceptHandler_kind: Branch (4886:5): [True: 2.21k, False: 0]
|
4887 | 2.21k | tp = (PyTypeObject *)state->ExceptHandler_type; |
4888 | 2.21k | result = PyType_GenericNew(tp, NULL, NULL); |
4889 | 2.21k | if (!result) goto failed; Branch (4889:13): [True: 0, False: 2.21k]
|
4890 | 2.21k | value = ast2obj_expr(state, o->v.ExceptHandler.type); |
4891 | 2.21k | if (!value) goto failed; Branch (4891:13): [True: 0, False: 2.21k]
|
4892 | 2.21k | if (PyObject_SetAttr(result, state->type, value) == -1) Branch (4892:13): [True: 0, False: 2.21k]
|
4893 | 0 | goto failed; |
4894 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4895 | 2.21k | value = ast2obj_identifier(state, o->v.ExceptHandler.name); Line | Count | Source | 1002 | 2.21k | #define ast2obj_identifier ast2obj_object |
|
4896 | 2.21k | if (!value) goto failed; Branch (4896:13): [True: 0, False: 2.21k]
|
4897 | 2.21k | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (4897:13): [True: 0, False: 2.21k]
|
4898 | 0 | goto failed; |
4899 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4900 | 2.21k | value = ast2obj_list(state, (asdl_seq*)o->v.ExceptHandler.body, |
4901 | 2.21k | ast2obj_stmt); |
4902 | 2.21k | if (!value) goto failed; Branch (4902:13): [True: 0, False: 2.21k]
|
4903 | 2.21k | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (4903:13): [True: 0, False: 2.21k]
|
4904 | 0 | goto failed; |
4905 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4906 | 2.21k | break; |
4907 | 2.21k | } |
4908 | 2.21k | value = ast2obj_int(state, o->lineno); |
4909 | 2.21k | if (!value) goto failed; Branch (4909:9): [True: 0, False: 2.21k]
|
4910 | 2.21k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (4910:9): [True: 0, False: 2.21k]
|
4911 | 0 | goto failed; |
4912 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4913 | 2.21k | value = ast2obj_int(state, o->col_offset); |
4914 | 2.21k | if (!value) goto failed; Branch (4914:9): [True: 0, False: 2.21k]
|
4915 | 2.21k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (4915:9): [True: 0, False: 2.21k]
|
4916 | 0 | goto failed; |
4917 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4918 | 2.21k | value = ast2obj_int(state, o->end_lineno); |
4919 | 2.21k | if (!value) goto failed; Branch (4919:9): [True: 0, False: 2.21k]
|
4920 | 2.21k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (4920:9): [True: 0, False: 2.21k]
|
4921 | 0 | goto failed; |
4922 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4923 | 2.21k | value = ast2obj_int(state, o->end_col_offset); |
4924 | 2.21k | if (!value) goto failed; Branch (4924:9): [True: 0, False: 2.21k]
|
4925 | 2.21k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (4925:9): [True: 0, False: 2.21k]
|
4926 | 0 | goto failed; |
4927 | 2.21k | Py_DECREF(value); Line | Count | Source | 548 | 2.21k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.21k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.21k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4928 | 2.21k | return result; |
4929 | 0 | failed: |
4930 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4931 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4932 | 0 | return NULL; |
4933 | 2.21k | } |
4934 | | |
4935 | | PyObject* |
4936 | | ast2obj_arguments(struct ast_state *state, void* _o) |
4937 | 19.9k | { |
4938 | 19.9k | arguments_ty o = (arguments_ty)_o; |
4939 | 19.9k | PyObject *result = NULL, *value = NULL; |
4940 | 19.9k | PyTypeObject *tp; |
4941 | 19.9k | if (!o) { Branch (4941:9): [True: 0, False: 19.9k]
|
4942 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
4943 | 0 | } |
4944 | 19.9k | tp = (PyTypeObject *)state->arguments_type; |
4945 | 19.9k | result = PyType_GenericNew(tp, NULL, NULL); |
4946 | 19.9k | if (!result) return NULL; Branch (4946:9): [True: 0, False: 19.9k]
|
4947 | 19.9k | value = ast2obj_list(state, (asdl_seq*)o->posonlyargs, ast2obj_arg); |
4948 | 19.9k | if (!value) goto failed; Branch (4948:9): [True: 0, False: 19.9k]
|
4949 | 19.9k | if (PyObject_SetAttr(result, state->posonlyargs, value) == -1) Branch (4949:9): [True: 0, False: 19.9k]
|
4950 | 0 | goto failed; |
4951 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4952 | 19.9k | value = ast2obj_list(state, (asdl_seq*)o->args, ast2obj_arg); |
4953 | 19.9k | if (!value) goto failed; Branch (4953:9): [True: 0, False: 19.9k]
|
4954 | 19.9k | if (PyObject_SetAttr(result, state->args, value) == -1) Branch (4954:9): [True: 0, False: 19.9k]
|
4955 | 0 | goto failed; |
4956 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4957 | 19.9k | value = ast2obj_arg(state, o->vararg); |
4958 | 19.9k | if (!value) goto failed; Branch (4958:9): [True: 0, False: 19.9k]
|
4959 | 19.9k | if (PyObject_SetAttr(result, state->vararg, value) == -1) Branch (4959:9): [True: 0, False: 19.9k]
|
4960 | 0 | goto failed; |
4961 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4962 | 19.9k | value = ast2obj_list(state, (asdl_seq*)o->kwonlyargs, ast2obj_arg); |
4963 | 19.9k | if (!value) goto failed; Branch (4963:9): [True: 0, False: 19.9k]
|
4964 | 19.9k | if (PyObject_SetAttr(result, state->kwonlyargs, value) == -1) Branch (4964:9): [True: 0, False: 19.9k]
|
4965 | 0 | goto failed; |
4966 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4967 | 19.9k | value = ast2obj_list(state, (asdl_seq*)o->kw_defaults, ast2obj_expr); |
4968 | 19.9k | if (!value) goto failed; Branch (4968:9): [True: 0, False: 19.9k]
|
4969 | 19.9k | if (PyObject_SetAttr(result, state->kw_defaults, value) == -1) Branch (4969:9): [True: 0, False: 19.9k]
|
4970 | 0 | goto failed; |
4971 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4972 | 19.9k | value = ast2obj_arg(state, o->kwarg); |
4973 | 19.9k | if (!value) goto failed; Branch (4973:9): [True: 0, False: 19.9k]
|
4974 | 19.9k | if (PyObject_SetAttr(result, state->kwarg, value) == -1) Branch (4974:9): [True: 0, False: 19.9k]
|
4975 | 0 | goto failed; |
4976 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4977 | 19.9k | value = ast2obj_list(state, (asdl_seq*)o->defaults, ast2obj_expr); |
4978 | 19.9k | if (!value) goto failed; Branch (4978:9): [True: 0, False: 19.9k]
|
4979 | 19.9k | if (PyObject_SetAttr(result, state->defaults, value) == -1) Branch (4979:9): [True: 0, False: 19.9k]
|
4980 | 0 | goto failed; |
4981 | 19.9k | Py_DECREF(value); Line | Count | Source | 548 | 19.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4982 | 19.9k | return result; |
4983 | 0 | failed: |
4984 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4985 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
4986 | 0 | return NULL; |
4987 | 19.9k | } |
4988 | | |
4989 | | PyObject* |
4990 | | ast2obj_arg(struct ast_state *state, void* _o) |
4991 | 71.5k | { |
4992 | 71.5k | arg_ty o = (arg_ty)_o; |
4993 | 71.5k | PyObject *result = NULL, *value = NULL; |
4994 | 71.5k | PyTypeObject *tp; |
4995 | 71.5k | if (!o) { Branch (4995:9): [True: 36.9k, False: 34.5k]
|
4996 | 36.9k | Py_RETURN_NONE; Line | Count | Source | 661 | 36.9k | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 36.9k | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 36.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
4997 | 36.9k | } |
4998 | 34.5k | tp = (PyTypeObject *)state->arg_type; |
4999 | 34.5k | result = PyType_GenericNew(tp, NULL, NULL); |
5000 | 34.5k | if (!result) return NULL; Branch (5000:9): [True: 0, False: 34.5k]
|
5001 | 34.5k | value = ast2obj_identifier(state, o->arg); Line | Count | Source | 1002 | 34.5k | #define ast2obj_identifier ast2obj_object |
|
5002 | 34.5k | if (!value) goto failed; Branch (5002:9): [True: 0, False: 34.5k]
|
5003 | 34.5k | if (PyObject_SetAttr(result, state->arg, value) == -1) Branch (5003:9): [True: 0, False: 34.5k]
|
5004 | 0 | goto failed; |
5005 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5006 | 34.5k | value = ast2obj_expr(state, o->annotation); |
5007 | 34.5k | if (!value) goto failed; Branch (5007:9): [True: 0, False: 34.5k]
|
5008 | 34.5k | if (PyObject_SetAttr(result, state->annotation, value) == -1) Branch (5008:9): [True: 0, False: 34.5k]
|
5009 | 0 | goto failed; |
5010 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5011 | 34.5k | value = ast2obj_string(state, o->type_comment); Line | Count | Source | 1003 | 34.5k | #define ast2obj_string ast2obj_object |
|
5012 | 34.5k | if (!value) goto failed; Branch (5012:9): [True: 0, False: 34.5k]
|
5013 | 34.5k | if (PyObject_SetAttr(result, state->type_comment, value) == -1) Branch (5013:9): [True: 0, False: 34.5k]
|
5014 | 0 | goto failed; |
5015 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5016 | 34.5k | value = ast2obj_int(state, o->lineno); |
5017 | 34.5k | if (!value) goto failed; Branch (5017:9): [True: 0, False: 34.5k]
|
5018 | 34.5k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (5018:9): [True: 0, False: 34.5k]
|
5019 | 0 | goto failed; |
5020 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5021 | 34.5k | value = ast2obj_int(state, o->col_offset); |
5022 | 34.5k | if (!value) goto failed; Branch (5022:9): [True: 0, False: 34.5k]
|
5023 | 34.5k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (5023:9): [True: 0, False: 34.5k]
|
5024 | 0 | goto failed; |
5025 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5026 | 34.5k | value = ast2obj_int(state, o->end_lineno); |
5027 | 34.5k | if (!value) goto failed; Branch (5027:9): [True: 0, False: 34.5k]
|
5028 | 34.5k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (5028:9): [True: 0, False: 34.5k]
|
5029 | 0 | goto failed; |
5030 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5031 | 34.5k | value = ast2obj_int(state, o->end_col_offset); |
5032 | 34.5k | if (!value) goto failed; Branch (5032:9): [True: 0, False: 34.5k]
|
5033 | 34.5k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (5033:9): [True: 0, False: 34.5k]
|
5034 | 0 | goto failed; |
5035 | 34.5k | Py_DECREF(value); Line | Count | Source | 548 | 34.5k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 34.5k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 34.5k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5036 | 34.5k | return result; |
5037 | 0 | failed: |
5038 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5039 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5040 | 0 | return NULL; |
5041 | 34.5k | } |
5042 | | |
5043 | | PyObject* |
5044 | | ast2obj_keyword(struct ast_state *state, void* _o) |
5045 | 6.27k | { |
5046 | 6.27k | keyword_ty o = (keyword_ty)_o; |
5047 | 6.27k | PyObject *result = NULL, *value = NULL; |
5048 | 6.27k | PyTypeObject *tp; |
5049 | 6.27k | if (!o) { Branch (5049:9): [True: 0, False: 6.27k]
|
5050 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
5051 | 0 | } |
5052 | 6.27k | tp = (PyTypeObject *)state->keyword_type; |
5053 | 6.27k | result = PyType_GenericNew(tp, NULL, NULL); |
5054 | 6.27k | if (!result) return NULL; Branch (5054:9): [True: 0, False: 6.27k]
|
5055 | 6.27k | value = ast2obj_identifier(state, o->arg); Line | Count | Source | 1002 | 6.27k | #define ast2obj_identifier ast2obj_object |
|
5056 | 6.27k | if (!value) goto failed; Branch (5056:9): [True: 0, False: 6.27k]
|
5057 | 6.27k | if (PyObject_SetAttr(result, state->arg, value) == -1) Branch (5057:9): [True: 0, False: 6.27k]
|
5058 | 0 | goto failed; |
5059 | 6.27k | Py_DECREF(value); Line | Count | Source | 548 | 6.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5060 | 6.27k | value = ast2obj_expr(state, o->value); |
5061 | 6.27k | if (!value) goto failed; Branch (5061:9): [True: 0, False: 6.27k]
|
5062 | 6.27k | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (5062:9): [True: 0, False: 6.27k]
|
5063 | 0 | goto failed; |
5064 | 6.27k | Py_DECREF(value); Line | Count | Source | 548 | 6.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5065 | 6.27k | value = ast2obj_int(state, o->lineno); |
5066 | 6.27k | if (!value) goto failed; Branch (5066:9): [True: 0, False: 6.27k]
|
5067 | 6.27k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (5067:9): [True: 0, False: 6.27k]
|
5068 | 0 | goto failed; |
5069 | 6.27k | Py_DECREF(value); Line | Count | Source | 548 | 6.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5070 | 6.27k | value = ast2obj_int(state, o->col_offset); |
5071 | 6.27k | if (!value) goto failed; Branch (5071:9): [True: 0, False: 6.27k]
|
5072 | 6.27k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (5072:9): [True: 0, False: 6.27k]
|
5073 | 0 | goto failed; |
5074 | 6.27k | Py_DECREF(value); Line | Count | Source | 548 | 6.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5075 | 6.27k | value = ast2obj_int(state, o->end_lineno); |
5076 | 6.27k | if (!value) goto failed; Branch (5076:9): [True: 0, False: 6.27k]
|
5077 | 6.27k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (5077:9): [True: 0, False: 6.27k]
|
5078 | 0 | goto failed; |
5079 | 6.27k | Py_DECREF(value); Line | Count | Source | 548 | 6.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5080 | 6.27k | value = ast2obj_int(state, o->end_col_offset); |
5081 | 6.27k | if (!value) goto failed; Branch (5081:9): [True: 0, False: 6.27k]
|
5082 | 6.27k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (5082:9): [True: 0, False: 6.27k]
|
5083 | 0 | goto failed; |
5084 | 6.27k | Py_DECREF(value); Line | Count | Source | 548 | 6.27k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.27k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.27k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5085 | 6.27k | return result; |
5086 | 0 | failed: |
5087 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5088 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5089 | 0 | return NULL; |
5090 | 6.27k | } |
5091 | | |
5092 | | PyObject* |
5093 | | ast2obj_alias(struct ast_state *state, void* _o) |
5094 | 3.42k | { |
5095 | 3.42k | alias_ty o = (alias_ty)_o; |
5096 | 3.42k | PyObject *result = NULL, *value = NULL; |
5097 | 3.42k | PyTypeObject *tp; |
5098 | 3.42k | if (!o) { Branch (5098:9): [True: 0, False: 3.42k]
|
5099 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
5100 | 0 | } |
5101 | 3.42k | tp = (PyTypeObject *)state->alias_type; |
5102 | 3.42k | result = PyType_GenericNew(tp, NULL, NULL); |
5103 | 3.42k | if (!result) return NULL; Branch (5103:9): [True: 0, False: 3.42k]
|
5104 | 3.42k | value = ast2obj_identifier(state, o->name); Line | Count | Source | 1002 | 3.42k | #define ast2obj_identifier ast2obj_object |
|
5105 | 3.42k | if (!value) goto failed; Branch (5105:9): [True: 0, False: 3.42k]
|
5106 | 3.42k | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (5106:9): [True: 0, False: 3.42k]
|
5107 | 0 | goto failed; |
5108 | 3.42k | Py_DECREF(value); Line | Count | Source | 548 | 3.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5109 | 3.42k | value = ast2obj_identifier(state, o->asname); Line | Count | Source | 1002 | 3.42k | #define ast2obj_identifier ast2obj_object |
|
5110 | 3.42k | if (!value) goto failed; Branch (5110:9): [True: 0, False: 3.42k]
|
5111 | 3.42k | if (PyObject_SetAttr(result, state->asname, value) == -1) Branch (5111:9): [True: 0, False: 3.42k]
|
5112 | 0 | goto failed; |
5113 | 3.42k | Py_DECREF(value); Line | Count | Source | 548 | 3.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5114 | 3.42k | value = ast2obj_int(state, o->lineno); |
5115 | 3.42k | if (!value) goto failed; Branch (5115:9): [True: 0, False: 3.42k]
|
5116 | 3.42k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (5116:9): [True: 0, False: 3.42k]
|
5117 | 0 | goto failed; |
5118 | 3.42k | Py_DECREF(value); Line | Count | Source | 548 | 3.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5119 | 3.42k | value = ast2obj_int(state, o->col_offset); |
5120 | 3.42k | if (!value) goto failed; Branch (5120:9): [True: 0, False: 3.42k]
|
5121 | 3.42k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (5121:9): [True: 0, False: 3.42k]
|
5122 | 0 | goto failed; |
5123 | 3.42k | Py_DECREF(value); Line | Count | Source | 548 | 3.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5124 | 3.42k | value = ast2obj_int(state, o->end_lineno); |
5125 | 3.42k | if (!value) goto failed; Branch (5125:9): [True: 0, False: 3.42k]
|
5126 | 3.42k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (5126:9): [True: 0, False: 3.42k]
|
5127 | 0 | goto failed; |
5128 | 3.42k | Py_DECREF(value); Line | Count | Source | 548 | 3.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5129 | 3.42k | value = ast2obj_int(state, o->end_col_offset); |
5130 | 3.42k | if (!value) goto failed; Branch (5130:9): [True: 0, False: 3.42k]
|
5131 | 3.42k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (5131:9): [True: 0, False: 3.42k]
|
5132 | 0 | goto failed; |
5133 | 3.42k | Py_DECREF(value); Line | Count | Source | 548 | 3.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5134 | 3.42k | return result; |
5135 | 0 | failed: |
5136 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5137 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5138 | 0 | return NULL; |
5139 | 3.42k | } |
5140 | | |
5141 | | PyObject* |
5142 | | ast2obj_withitem(struct ast_state *state, void* _o) |
5143 | 1.56k | { |
5144 | 1.56k | withitem_ty o = (withitem_ty)_o; |
5145 | 1.56k | PyObject *result = NULL, *value = NULL; |
5146 | 1.56k | PyTypeObject *tp; |
5147 | 1.56k | if (!o) { Branch (5147:9): [True: 0, False: 1.56k]
|
5148 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
5149 | 0 | } |
5150 | 1.56k | tp = (PyTypeObject *)state->withitem_type; |
5151 | 1.56k | result = PyType_GenericNew(tp, NULL, NULL); |
5152 | 1.56k | if (!result) return NULL; Branch (5152:9): [True: 0, False: 1.56k]
|
5153 | 1.56k | value = ast2obj_expr(state, o->context_expr); |
5154 | 1.56k | if (!value) goto failed; Branch (5154:9): [True: 0, False: 1.56k]
|
5155 | 1.56k | if (PyObject_SetAttr(result, state->context_expr, value) == -1) Branch (5155:9): [True: 0, False: 1.56k]
|
5156 | 0 | goto failed; |
5157 | 1.56k | Py_DECREF(value); Line | Count | Source | 548 | 1.56k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.56k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.56k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5158 | 1.56k | value = ast2obj_expr(state, o->optional_vars); |
5159 | 1.56k | if (!value) goto failed; Branch (5159:9): [True: 0, False: 1.56k]
|
5160 | 1.56k | if (PyObject_SetAttr(result, state->optional_vars, value) == -1) Branch (5160:9): [True: 0, False: 1.56k]
|
5161 | 0 | goto failed; |
5162 | 1.56k | Py_DECREF(value); Line | Count | Source | 548 | 1.56k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.56k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.56k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5163 | 1.56k | return result; |
5164 | 0 | failed: |
5165 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5166 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5167 | 0 | return NULL; |
5168 | 1.56k | } |
5169 | | |
5170 | | PyObject* |
5171 | | ast2obj_match_case(struct ast_state *state, void* _o) |
5172 | 782 | { |
5173 | 782 | match_case_ty o = (match_case_ty)_o; |
5174 | 782 | PyObject *result = NULL, *value = NULL; |
5175 | 782 | PyTypeObject *tp; |
5176 | 782 | if (!o) { Branch (5176:9): [True: 0, False: 782]
|
5177 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
5178 | 0 | } |
5179 | 782 | tp = (PyTypeObject *)state->match_case_type; |
5180 | 782 | result = PyType_GenericNew(tp, NULL, NULL); |
5181 | 782 | if (!result) return NULL; Branch (5181:9): [True: 0, False: 782]
|
5182 | 782 | value = ast2obj_pattern(state, o->pattern); |
5183 | 782 | if (!value) goto failed; Branch (5183:9): [True: 0, False: 782]
|
5184 | 782 | if (PyObject_SetAttr(result, state->pattern, value) == -1) Branch (5184:9): [True: 0, False: 782]
|
5185 | 0 | goto failed; |
5186 | 782 | Py_DECREF(value); Line | Count | Source | 548 | 782 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 782 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 782 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5187 | 782 | value = ast2obj_expr(state, o->guard); |
5188 | 782 | if (!value) goto failed; Branch (5188:9): [True: 0, False: 782]
|
5189 | 782 | if (PyObject_SetAttr(result, state->guard, value) == -1) Branch (5189:9): [True: 0, False: 782]
|
5190 | 0 | goto failed; |
5191 | 782 | Py_DECREF(value); Line | Count | Source | 548 | 782 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 782 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 782 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5192 | 782 | value = ast2obj_list(state, (asdl_seq*)o->body, ast2obj_stmt); |
5193 | 782 | if (!value) goto failed; Branch (5193:9): [True: 0, False: 782]
|
5194 | 782 | if (PyObject_SetAttr(result, state->body, value) == -1) Branch (5194:9): [True: 0, False: 782]
|
5195 | 0 | goto failed; |
5196 | 782 | Py_DECREF(value); Line | Count | Source | 548 | 782 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 782 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 782 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5197 | 782 | return result; |
5198 | 0 | failed: |
5199 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5200 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5201 | 0 | return NULL; |
5202 | 782 | } |
5203 | | |
5204 | | PyObject* |
5205 | | ast2obj_pattern(struct ast_state *state, void* _o) |
5206 | 2.52k | { |
5207 | 2.52k | pattern_ty o = (pattern_ty)_o; |
5208 | 2.52k | PyObject *result = NULL, *value = NULL; |
5209 | 2.52k | PyTypeObject *tp; |
5210 | 2.52k | if (!o) { Branch (5210:9): [True: 464, False: 2.06k]
|
5211 | 464 | Py_RETURN_NONE; Line | Count | Source | 661 | 464 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 464 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 464 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 464 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
5212 | 464 | } |
5213 | 2.06k | switch (o->kind) { Branch (5213:13): [True: 0, False: 2.06k]
|
5214 | 760 | case MatchValue_kind: Branch (5214:5): [True: 760, False: 1.30k]
|
5215 | 760 | tp = (PyTypeObject *)state->MatchValue_type; |
5216 | 760 | result = PyType_GenericNew(tp, NULL, NULL); |
5217 | 760 | if (!result) goto failed; Branch (5217:13): [True: 0, False: 760]
|
5218 | 760 | value = ast2obj_expr(state, o->v.MatchValue.value); |
5219 | 760 | if (!value) goto failed; Branch (5219:13): [True: 0, False: 760]
|
5220 | 760 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (5220:13): [True: 0, False: 760]
|
5221 | 0 | goto failed; |
5222 | 760 | Py_DECREF(value); Line | Count | Source | 548 | 760 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 760 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 760 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5223 | 760 | break; |
5224 | 22 | case MatchSingleton_kind: Branch (5224:5): [True: 22, False: 2.04k]
|
5225 | 22 | tp = (PyTypeObject *)state->MatchSingleton_type; |
5226 | 22 | result = PyType_GenericNew(tp, NULL, NULL); |
5227 | 22 | if (!result) goto failed; Branch (5227:13): [True: 0, False: 22]
|
5228 | 22 | value = ast2obj_constant(state, o->v.MatchSingleton.value); Line | Count | Source | 1001 | 22 | #define ast2obj_constant ast2obj_object |
|
5229 | 22 | if (!value) goto failed; Branch (5229:13): [True: 0, False: 22]
|
5230 | 22 | if (PyObject_SetAttr(result, state->value, value) == -1) Branch (5230:13): [True: 0, False: 22]
|
5231 | 0 | goto failed; |
5232 | 22 | Py_DECREF(value); Line | Count | Source | 548 | 22 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5233 | 22 | break; |
5234 | 302 | case MatchSequence_kind: Branch (5234:5): [True: 302, False: 1.76k]
|
5235 | 302 | tp = (PyTypeObject *)state->MatchSequence_type; |
5236 | 302 | result = PyType_GenericNew(tp, NULL, NULL); |
5237 | 302 | if (!result) goto failed; Branch (5237:13): [True: 0, False: 302]
|
5238 | 302 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchSequence.patterns, |
5239 | 302 | ast2obj_pattern); |
5240 | 302 | if (!value) goto failed; Branch (5240:13): [True: 0, False: 302]
|
5241 | 302 | if (PyObject_SetAttr(result, state->patterns, value) == -1) Branch (5241:13): [True: 0, False: 302]
|
5242 | 0 | goto failed; |
5243 | 302 | Py_DECREF(value); Line | Count | Source | 548 | 302 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 302 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 302 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5244 | 302 | break; |
5245 | 156 | case MatchMapping_kind: Branch (5245:5): [True: 156, False: 1.90k]
|
5246 | 156 | tp = (PyTypeObject *)state->MatchMapping_type; |
5247 | 156 | result = PyType_GenericNew(tp, NULL, NULL); |
5248 | 156 | if (!result) goto failed; Branch (5248:13): [True: 0, False: 156]
|
5249 | 156 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchMapping.keys, |
5250 | 156 | ast2obj_expr); |
5251 | 156 | if (!value) goto failed; Branch (5251:13): [True: 0, False: 156]
|
5252 | 156 | if (PyObject_SetAttr(result, state->keys, value) == -1) Branch (5252:13): [True: 0, False: 156]
|
5253 | 0 | goto failed; |
5254 | 156 | Py_DECREF(value); Line | Count | Source | 548 | 156 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 156 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 156 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5255 | 156 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchMapping.patterns, |
5256 | 156 | ast2obj_pattern); |
5257 | 156 | if (!value) goto failed; Branch (5257:13): [True: 0, False: 156]
|
5258 | 156 | if (PyObject_SetAttr(result, state->patterns, value) == -1) Branch (5258:13): [True: 0, False: 156]
|
5259 | 0 | goto failed; |
5260 | 156 | Py_DECREF(value); Line | Count | Source | 548 | 156 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 156 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 156 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5261 | 156 | value = ast2obj_identifier(state, o->v.MatchMapping.rest); Line | Count | Source | 1002 | 156 | #define ast2obj_identifier ast2obj_object |
|
5262 | 156 | if (!value) goto failed; Branch (5262:13): [True: 0, False: 156]
|
5263 | 156 | if (PyObject_SetAttr(result, state->rest, value) == -1) Branch (5263:13): [True: 0, False: 156]
|
5264 | 0 | goto failed; |
5265 | 156 | Py_DECREF(value); Line | Count | Source | 548 | 156 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 156 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 156 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5266 | 156 | break; |
5267 | 98 | case MatchClass_kind: Branch (5267:5): [True: 98, False: 1.96k]
|
5268 | 98 | tp = (PyTypeObject *)state->MatchClass_type; |
5269 | 98 | result = PyType_GenericNew(tp, NULL, NULL); |
5270 | 98 | if (!result) goto failed; Branch (5270:13): [True: 0, False: 98]
|
5271 | 98 | value = ast2obj_expr(state, o->v.MatchClass.cls); |
5272 | 98 | if (!value) goto failed; Branch (5272:13): [True: 0, False: 98]
|
5273 | 98 | if (PyObject_SetAttr(result, state->cls, value) == -1) Branch (5273:13): [True: 0, False: 98]
|
5274 | 0 | goto failed; |
5275 | 98 | Py_DECREF(value); Line | Count | Source | 548 | 98 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 98 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 98 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5276 | 98 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchClass.patterns, |
5277 | 98 | ast2obj_pattern); |
5278 | 98 | if (!value) goto failed; Branch (5278:13): [True: 0, False: 98]
|
5279 | 98 | if (PyObject_SetAttr(result, state->patterns, value) == -1) Branch (5279:13): [True: 0, False: 98]
|
5280 | 0 | goto failed; |
5281 | 98 | Py_DECREF(value); Line | Count | Source | 548 | 98 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 98 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 98 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5282 | 98 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchClass.kwd_attrs, |
5283 | 98 | ast2obj_identifier); Line | Count | Source | 1002 | 98 | #define ast2obj_identifier ast2obj_object |
|
5284 | 98 | if (!value) goto failed; Branch (5284:13): [True: 0, False: 98]
|
5285 | 98 | if (PyObject_SetAttr(result, state->kwd_attrs, value) == -1) Branch (5285:13): [True: 0, False: 98]
|
5286 | 0 | goto failed; |
5287 | 98 | Py_DECREF(value); Line | Count | Source | 548 | 98 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 98 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 98 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5288 | 98 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchClass.kwd_patterns, |
5289 | 98 | ast2obj_pattern); |
5290 | 98 | if (!value) goto failed; Branch (5290:13): [True: 0, False: 98]
|
5291 | 98 | if (PyObject_SetAttr(result, state->kwd_patterns, value) == -1) Branch (5291:13): [True: 0, False: 98]
|
5292 | 0 | goto failed; |
5293 | 98 | Py_DECREF(value); Line | Count | Source | 548 | 98 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 98 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 98 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5294 | 98 | break; |
5295 | 72 | case MatchStar_kind: Branch (5295:5): [True: 72, False: 1.99k]
|
5296 | 72 | tp = (PyTypeObject *)state->MatchStar_type; |
5297 | 72 | result = PyType_GenericNew(tp, NULL, NULL); |
5298 | 72 | if (!result) goto failed; Branch (5298:13): [True: 0, False: 72]
|
5299 | 72 | value = ast2obj_identifier(state, o->v.MatchStar.name); Line | Count | Source | 1002 | 72 | #define ast2obj_identifier ast2obj_object |
|
5300 | 72 | if (!value) goto failed; Branch (5300:13): [True: 0, False: 72]
|
5301 | 72 | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (5301:13): [True: 0, False: 72]
|
5302 | 0 | goto failed; |
5303 | 72 | Py_DECREF(value); Line | Count | Source | 548 | 72 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 72 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 72 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5304 | 72 | break; |
5305 | 554 | case MatchAs_kind: Branch (5305:5): [True: 554, False: 1.51k]
|
5306 | 554 | tp = (PyTypeObject *)state->MatchAs_type; |
5307 | 554 | result = PyType_GenericNew(tp, NULL, NULL); |
5308 | 554 | if (!result) goto failed; Branch (5308:13): [True: 0, False: 554]
|
5309 | 554 | value = ast2obj_pattern(state, o->v.MatchAs.pattern); |
5310 | 554 | if (!value) goto failed; Branch (5310:13): [True: 0, False: 554]
|
5311 | 554 | if (PyObject_SetAttr(result, state->pattern, value) == -1) Branch (5311:13): [True: 0, False: 554]
|
5312 | 0 | goto failed; |
5313 | 554 | Py_DECREF(value); Line | Count | Source | 548 | 554 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 554 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 554 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5314 | 554 | value = ast2obj_identifier(state, o->v.MatchAs.name); Line | Count | Source | 1002 | 554 | #define ast2obj_identifier ast2obj_object |
|
5315 | 554 | if (!value) goto failed; Branch (5315:13): [True: 0, False: 554]
|
5316 | 554 | if (PyObject_SetAttr(result, state->name, value) == -1) Branch (5316:13): [True: 0, False: 554]
|
5317 | 0 | goto failed; |
5318 | 554 | Py_DECREF(value); Line | Count | Source | 548 | 554 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 554 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 554 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5319 | 554 | break; |
5320 | 100 | case MatchOr_kind: Branch (5320:5): [True: 100, False: 1.96k]
|
5321 | 100 | tp = (PyTypeObject *)state->MatchOr_type; |
5322 | 100 | result = PyType_GenericNew(tp, NULL, NULL); |
5323 | 100 | if (!result) goto failed; Branch (5323:13): [True: 0, False: 100]
|
5324 | 100 | value = ast2obj_list(state, (asdl_seq*)o->v.MatchOr.patterns, |
5325 | 100 | ast2obj_pattern); |
5326 | 100 | if (!value) goto failed; Branch (5326:13): [True: 0, False: 100]
|
5327 | 100 | if (PyObject_SetAttr(result, state->patterns, value) == -1) Branch (5327:13): [True: 0, False: 100]
|
5328 | 0 | goto failed; |
5329 | 100 | Py_DECREF(value); Line | Count | Source | 548 | 100 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 100 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 100 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5330 | 100 | break; |
5331 | 2.06k | } |
5332 | 2.06k | value = ast2obj_int(state, o->lineno); |
5333 | 2.06k | if (!value) goto failed; Branch (5333:9): [True: 0, False: 2.06k]
|
5334 | 2.06k | if (PyObject_SetAttr(result, state->lineno, value) < 0) Branch (5334:9): [True: 0, False: 2.06k]
|
5335 | 0 | goto failed; |
5336 | 2.06k | Py_DECREF(value); Line | Count | Source | 548 | 2.06k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5337 | 2.06k | value = ast2obj_int(state, o->col_offset); |
5338 | 2.06k | if (!value) goto failed; Branch (5338:9): [True: 0, False: 2.06k]
|
5339 | 2.06k | if (PyObject_SetAttr(result, state->col_offset, value) < 0) Branch (5339:9): [True: 0, False: 2.06k]
|
5340 | 0 | goto failed; |
5341 | 2.06k | Py_DECREF(value); Line | Count | Source | 548 | 2.06k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5342 | 2.06k | value = ast2obj_int(state, o->end_lineno); |
5343 | 2.06k | if (!value) goto failed; Branch (5343:9): [True: 0, False: 2.06k]
|
5344 | 2.06k | if (PyObject_SetAttr(result, state->end_lineno, value) < 0) Branch (5344:9): [True: 0, False: 2.06k]
|
5345 | 0 | goto failed; |
5346 | 2.06k | Py_DECREF(value); Line | Count | Source | 548 | 2.06k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5347 | 2.06k | value = ast2obj_int(state, o->end_col_offset); |
5348 | 2.06k | if (!value) goto failed; Branch (5348:9): [True: 0, False: 2.06k]
|
5349 | 2.06k | if (PyObject_SetAttr(result, state->end_col_offset, value) < 0) Branch (5349:9): [True: 0, False: 2.06k]
|
5350 | 0 | goto failed; |
5351 | 2.06k | Py_DECREF(value); Line | Count | Source | 548 | 2.06k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5352 | 2.06k | return result; |
5353 | 0 | failed: |
5354 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5355 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5356 | 0 | return NULL; |
5357 | 2.06k | } |
5358 | | |
5359 | | PyObject* |
5360 | | ast2obj_type_ignore(struct ast_state *state, void* _o) |
5361 | 74 | { |
5362 | 74 | type_ignore_ty o = (type_ignore_ty)_o; |
5363 | 74 | PyObject *result = NULL, *value = NULL; |
5364 | 74 | PyTypeObject *tp; |
5365 | 74 | if (!o) { Branch (5365:9): [True: 0, False: 74]
|
5366 | 0 | Py_RETURN_NONE; Line | Count | Source | 661 | 0 | #define Py_RETURN_NONE return Py_NewRef(Py_None) Line | Count | Source | 639 | 0 | # define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
|
5367 | 0 | } |
5368 | 74 | switch (o->kind) { Branch (5368:13): [True: 0, False: 74]
|
5369 | 74 | case TypeIgnore_kind: Branch (5369:5): [True: 74, False: 0]
|
5370 | 74 | tp = (PyTypeObject *)state->TypeIgnore_type; |
5371 | 74 | result = PyType_GenericNew(tp, NULL, NULL); |
5372 | 74 | if (!result) goto failed; Branch (5372:13): [True: 0, False: 74]
|
5373 | 74 | value = ast2obj_int(state, o->v.TypeIgnore.lineno); |
5374 | 74 | if (!value) goto failed; Branch (5374:13): [True: 0, False: 74]
|
5375 | 74 | if (PyObject_SetAttr(result, state->lineno, value) == -1) Branch (5375:13): [True: 0, False: 74]
|
5376 | 0 | goto failed; |
5377 | 74 | Py_DECREF(value); Line | Count | Source | 548 | 74 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 74 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 74 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5378 | 74 | value = ast2obj_string(state, o->v.TypeIgnore.tag); Line | Count | Source | 1003 | 74 | #define ast2obj_string ast2obj_object |
|
5379 | 74 | if (!value) goto failed; Branch (5379:13): [True: 0, False: 74]
|
5380 | 74 | if (PyObject_SetAttr(result, state->tag, value) == -1) Branch (5380:13): [True: 0, False: 74]
|
5381 | 0 | goto failed; |
5382 | 74 | Py_DECREF(value); Line | Count | Source | 548 | 74 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 74 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 74 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5383 | 74 | break; |
5384 | 74 | } |
5385 | 74 | return result; |
5386 | 0 | failed: |
5387 | 0 | Py_XDECREF(value); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5388 | 0 | Py_XDECREF(result); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5389 | 0 | return NULL; |
5390 | 74 | } |
5391 | | |
5392 | | |
5393 | | int |
5394 | | obj2ast_mod(struct ast_state *state, PyObject* obj, mod_ty* out, PyArena* arena) |
5395 | 686 | { |
5396 | 686 | int isinstance; |
5397 | | |
5398 | 686 | PyObject *tmp = NULL; |
5399 | 686 | PyObject *tp; |
5400 | | |
5401 | 686 | if (obj == Py_None) {Line | Count | Source | 654 | 686 | #define Py_None (&_Py_NoneStruct) |
Branch (5401:9): [True: 0, False: 686]
|
5402 | 0 | *out = NULL; |
5403 | 0 | return 0; |
5404 | 0 | } |
5405 | 686 | tp = state->Module_type; |
5406 | 686 | isinstance = PyObject_IsInstance(obj, tp); |
5407 | 686 | if (isinstance == -1) { Branch (5407:9): [True: 0, False: 686]
|
5408 | 0 | return 1; |
5409 | 0 | } |
5410 | 686 | if (isinstance) { Branch (5410:9): [True: 573, False: 113]
|
5411 | 573 | asdl_stmt_seq* body; |
5412 | 573 | asdl_type_ignore_seq* type_ignores; |
5413 | | |
5414 | 573 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (5414:13): [True: 0, False: 573]
|
5415 | 0 | return 1; |
5416 | 0 | } |
5417 | 573 | if (tmp == NULL) { Branch (5417:13): [True: 0, False: 573]
|
5418 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Module"); |
5419 | 0 | return 1; |
5420 | 0 | } |
5421 | 573 | else { |
5422 | 573 | int res; |
5423 | 573 | Py_ssize_t len; |
5424 | 573 | Py_ssize_t i; |
5425 | 573 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 573 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 573 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5425:17): [True: 0, False: 573]
|
5426 | 0 | PyErr_Format(PyExc_TypeError, "Module field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5427 | 0 | goto failed; |
5428 | 0 | } |
5429 | 573 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 573 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 573 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 573 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5430 | 573 | body = _Py_asdl_stmt_seq_new(len, arena); |
5431 | 573 | if (body == NULL) goto failed; Branch (5431:17): [True: 0, False: 573]
|
5432 | 6.67k | for (i = 0; i < len; i++) { Branch (5432:25): [True: 6.10k, False: 568]
|
5433 | 6.10k | stmt_ty val; |
5434 | 6.10k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 6.10k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 6.10k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 6.10k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5435 | 6.10k | Py_INCREF(tmp2); Line | Count | Source | 512 | 6.10k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.10k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.10k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5436 | 6.10k | if (_Py_EnterRecursiveCall(" while traversing 'Module' node")) { Branch (5436:21): [True: 0, False: 6.10k]
|
5437 | 0 | goto failed; |
5438 | 0 | } |
5439 | 6.10k | res = obj2ast_stmt(state, tmp2, &val, arena); |
5440 | 6.10k | _Py_LeaveRecursiveCall(); |
5441 | 6.10k | Py_DECREF(tmp2); Line | Count | Source | 548 | 6.10k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.10k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.10k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5442 | 6.10k | if (res != 0) goto failed; Branch (5442:21): [True: 5, False: 6.10k]
|
5443 | 6.10k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 6.10k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.10k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.10k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5443:21): [True: 0, False: 6.10k]
|
5444 | 0 | PyErr_SetString(PyExc_RuntimeError, "Module field \"body\" changed size during iteration"); |
5445 | 0 | goto failed; |
5446 | 0 | } |
5447 | 6.10k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 6.10k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 6.10k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5448 | 6.10k | } |
5449 | 568 | Py_CLEAR(tmp); Line | Count | Source | 587 | 568 | do { \ | 588 | 568 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 568 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 568 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 568 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 568, False: 0]
| 590 | 568 | (op) = NULL; \ | 591 | 568 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 568 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 568 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 568 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 568 | } \ | 593 | 568 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5450 | 568 | } |
5451 | 568 | if (_PyObject_LookupAttr(obj, state->type_ignores, &tmp) < 0) { Branch (5451:13): [True: 0, False: 568]
|
5452 | 0 | return 1; |
5453 | 0 | } |
5454 | 568 | if (tmp == NULL) { Branch (5454:13): [True: 0, False: 568]
|
5455 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"type_ignores\" missing from Module"); |
5456 | 0 | return 1; |
5457 | 0 | } |
5458 | 568 | else { |
5459 | 568 | int res; |
5460 | 568 | Py_ssize_t len; |
5461 | 568 | Py_ssize_t i; |
5462 | 568 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 568 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 568 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5462:17): [True: 0, False: 568]
|
5463 | 0 | PyErr_Format(PyExc_TypeError, "Module field \"type_ignores\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5464 | 0 | goto failed; |
5465 | 0 | } |
5466 | 568 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 568 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 568 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 568 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5467 | 568 | type_ignores = _Py_asdl_type_ignore_seq_new(len, arena); |
5468 | 568 | if (type_ignores == NULL) goto failed; Branch (5468:17): [True: 0, False: 568]
|
5469 | 568 | for (i = 0; i < len; i++) { Branch (5469:25): [True: 0, False: 568]
|
5470 | 0 | type_ignore_ty val; |
5471 | 0 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 0 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 0 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5472 | 0 | Py_INCREF(tmp2); Line | Count | Source | 512 | 0 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5473 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'Module' node")) { Branch (5473:21): [True: 0, False: 0]
|
5474 | 0 | goto failed; |
5475 | 0 | } |
5476 | 0 | res = obj2ast_type_ignore(state, tmp2, &val, arena); |
5477 | 0 | _Py_LeaveRecursiveCall(); |
5478 | 0 | Py_DECREF(tmp2); Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5479 | 0 | if (res != 0) goto failed; Branch (5479:21): [True: 0, False: 0]
|
5480 | 0 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 0 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5480:21): [True: 0, False: 0]
|
5481 | 0 | PyErr_SetString(PyExc_RuntimeError, "Module field \"type_ignores\" changed size during iteration"); |
5482 | 0 | goto failed; |
5483 | 0 | } |
5484 | 0 | asdl_seq_SET(type_ignores, i, val); Line | Count | Source | 94 | 0 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 0 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5485 | 0 | } |
5486 | 568 | Py_CLEAR(tmp); Line | Count | Source | 587 | 568 | do { \ | 588 | 568 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 568 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 568 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 568 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 568, False: 0]
| 590 | 568 | (op) = NULL; \ | 591 | 568 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 568 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 568 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 568 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 568 | } \ | 593 | 568 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5487 | 568 | } |
5488 | 568 | *out = _PyAST_Module(body, type_ignores, arena); |
5489 | 568 | if (*out == NULL) goto failed; Branch (5489:13): [True: 0, False: 568]
|
5490 | 568 | return 0; |
5491 | 568 | } |
5492 | 113 | tp = state->Interactive_type; |
5493 | 113 | isinstance = PyObject_IsInstance(obj, tp); |
5494 | 113 | if (isinstance == -1) { Branch (5494:9): [True: 0, False: 113]
|
5495 | 0 | return 1; |
5496 | 0 | } |
5497 | 113 | if (isinstance) { Branch (5497:9): [True: 2, False: 111]
|
5498 | 2 | asdl_stmt_seq* body; |
5499 | | |
5500 | 2 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (5500:13): [True: 0, False: 2]
|
5501 | 0 | return 1; |
5502 | 0 | } |
5503 | 2 | if (tmp == NULL) { Branch (5503:13): [True: 0, False: 2]
|
5504 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Interactive"); |
5505 | 0 | return 1; |
5506 | 0 | } |
5507 | 2 | else { |
5508 | 2 | int res; |
5509 | 2 | Py_ssize_t len; |
5510 | 2 | Py_ssize_t i; |
5511 | 2 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 2 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 2 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5511:17): [True: 0, False: 2]
|
5512 | 0 | PyErr_Format(PyExc_TypeError, "Interactive field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5513 | 0 | goto failed; |
5514 | 0 | } |
5515 | 2 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 2 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5516 | 2 | body = _Py_asdl_stmt_seq_new(len, arena); |
5517 | 2 | if (body == NULL) goto failed; Branch (5517:17): [True: 0, False: 2]
|
5518 | 4 | for (i = 0; i < len; i++) { Branch (5518:25): [True: 2, False: 2]
|
5519 | 2 | stmt_ty val; |
5520 | 2 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 2 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 2 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5521 | 2 | Py_INCREF(tmp2); Line | Count | Source | 512 | 2 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5522 | 2 | if (_Py_EnterRecursiveCall(" while traversing 'Interactive' node")) { Branch (5522:21): [True: 0, False: 2]
|
5523 | 0 | goto failed; |
5524 | 0 | } |
5525 | 2 | res = obj2ast_stmt(state, tmp2, &val, arena); |
5526 | 2 | _Py_LeaveRecursiveCall(); |
5527 | 2 | Py_DECREF(tmp2); Line | Count | Source | 548 | 2 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5528 | 2 | if (res != 0) goto failed; Branch (5528:21): [True: 0, False: 2]
|
5529 | 2 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 2 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5529:21): [True: 0, False: 2]
|
5530 | 0 | PyErr_SetString(PyExc_RuntimeError, "Interactive field \"body\" changed size during iteration"); |
5531 | 0 | goto failed; |
5532 | 0 | } |
5533 | 2 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 2 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 2 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5534 | 2 | } |
5535 | 2 | Py_CLEAR(tmp); Line | Count | Source | 587 | 2 | do { \ | 588 | 2 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2, False: 0]
| 590 | 2 | (op) = NULL; \ | 591 | 2 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2 | } \ | 593 | 2 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5536 | 2 | } |
5537 | 2 | *out = _PyAST_Interactive(body, arena); |
5538 | 2 | if (*out == NULL) goto failed; Branch (5538:13): [True: 0, False: 2]
|
5539 | 2 | return 0; |
5540 | 2 | } |
5541 | 111 | tp = state->Expression_type; |
5542 | 111 | isinstance = PyObject_IsInstance(obj, tp); |
5543 | 111 | if (isinstance == -1) { Branch (5543:9): [True: 0, False: 111]
|
5544 | 0 | return 1; |
5545 | 0 | } |
5546 | 111 | if (isinstance) { Branch (5546:9): [True: 111, False: 0]
|
5547 | 111 | expr_ty body; |
5548 | | |
5549 | 111 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (5549:13): [True: 0, False: 111]
|
5550 | 0 | return 1; |
5551 | 0 | } |
5552 | 111 | if (tmp == NULL) { Branch (5552:13): [True: 0, False: 111]
|
5553 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Expression"); |
5554 | 0 | return 1; |
5555 | 0 | } |
5556 | 111 | else { |
5557 | 111 | int res; |
5558 | 111 | if (_Py_EnterRecursiveCall(" while traversing 'Expression' node")) { Branch (5558:17): [True: 0, False: 111]
|
5559 | 0 | goto failed; |
5560 | 0 | } |
5561 | 111 | res = obj2ast_expr(state, tmp, &body, arena); |
5562 | 111 | _Py_LeaveRecursiveCall(); |
5563 | 111 | if (res != 0) goto failed; Branch (5563:17): [True: 2, False: 109]
|
5564 | 109 | Py_CLEAR(tmp); Line | Count | Source | 587 | 109 | do { \ | 588 | 109 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 109 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 109 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 109 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 109, False: 0]
| 590 | 109 | (op) = NULL; \ | 591 | 109 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 109 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 109 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 109 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 109 | } \ | 593 | 109 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5565 | 109 | } |
5566 | 109 | *out = _PyAST_Expression(body, arena); |
5567 | 109 | if (*out == NULL) goto failed; Branch (5567:13): [True: 0, False: 109]
|
5568 | 109 | return 0; |
5569 | 109 | } |
5570 | 0 | tp = state->FunctionType_type; |
5571 | 0 | isinstance = PyObject_IsInstance(obj, tp); |
5572 | 0 | if (isinstance == -1) { Branch (5572:9): [True: 0, False: 0]
|
5573 | 0 | return 1; |
5574 | 0 | } |
5575 | 0 | if (isinstance) { Branch (5575:9): [True: 0, False: 0]
|
5576 | 0 | asdl_expr_seq* argtypes; |
5577 | 0 | expr_ty returns; |
5578 | |
|
5579 | 0 | if (_PyObject_LookupAttr(obj, state->argtypes, &tmp) < 0) { Branch (5579:13): [True: 0, False: 0]
|
5580 | 0 | return 1; |
5581 | 0 | } |
5582 | 0 | if (tmp == NULL) { Branch (5582:13): [True: 0, False: 0]
|
5583 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"argtypes\" missing from FunctionType"); |
5584 | 0 | return 1; |
5585 | 0 | } |
5586 | 0 | else { |
5587 | 0 | int res; |
5588 | 0 | Py_ssize_t len; |
5589 | 0 | Py_ssize_t i; |
5590 | 0 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 0 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 0 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5590:17): [True: 0, False: 0]
|
5591 | 0 | PyErr_Format(PyExc_TypeError, "FunctionType field \"argtypes\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5592 | 0 | goto failed; |
5593 | 0 | } |
5594 | 0 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 0 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5595 | 0 | argtypes = _Py_asdl_expr_seq_new(len, arena); |
5596 | 0 | if (argtypes == NULL) goto failed; Branch (5596:17): [True: 0, False: 0]
|
5597 | 0 | for (i = 0; i < len; i++) { Branch (5597:25): [True: 0, False: 0]
|
5598 | 0 | expr_ty val; |
5599 | 0 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 0 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 0 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5600 | 0 | Py_INCREF(tmp2); Line | Count | Source | 512 | 0 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5601 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'FunctionType' node")) { Branch (5601:21): [True: 0, False: 0]
|
5602 | 0 | goto failed; |
5603 | 0 | } |
5604 | 0 | res = obj2ast_expr(state, tmp2, &val, arena); |
5605 | 0 | _Py_LeaveRecursiveCall(); |
5606 | 0 | Py_DECREF(tmp2); Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5607 | 0 | if (res != 0) goto failed; Branch (5607:21): [True: 0, False: 0]
|
5608 | 0 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 0 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5608:21): [True: 0, False: 0]
|
5609 | 0 | PyErr_SetString(PyExc_RuntimeError, "FunctionType field \"argtypes\" changed size during iteration"); |
5610 | 0 | goto failed; |
5611 | 0 | } |
5612 | 0 | asdl_seq_SET(argtypes, i, val); Line | Count | Source | 94 | 0 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 0 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5613 | 0 | } |
5614 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5615 | 0 | } |
5616 | 0 | if (_PyObject_LookupAttr(obj, state->returns, &tmp) < 0) { Branch (5616:13): [True: 0, False: 0]
|
5617 | 0 | return 1; |
5618 | 0 | } |
5619 | 0 | if (tmp == NULL) { Branch (5619:13): [True: 0, False: 0]
|
5620 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"returns\" missing from FunctionType"); |
5621 | 0 | return 1; |
5622 | 0 | } |
5623 | 0 | else { |
5624 | 0 | int res; |
5625 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'FunctionType' node")) { Branch (5625:17): [True: 0, False: 0]
|
5626 | 0 | goto failed; |
5627 | 0 | } |
5628 | 0 | res = obj2ast_expr(state, tmp, &returns, arena); |
5629 | 0 | _Py_LeaveRecursiveCall(); |
5630 | 0 | if (res != 0) goto failed; Branch (5630:17): [True: 0, False: 0]
|
5631 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5632 | 0 | } |
5633 | 0 | *out = _PyAST_FunctionType(argtypes, returns, arena); |
5634 | 0 | if (*out == NULL) goto failed; Branch (5634:13): [True: 0, False: 0]
|
5635 | 0 | return 0; |
5636 | 0 | } |
5637 | | |
5638 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of mod, but got %R", obj); |
5639 | 7 | failed: |
5640 | 7 | Py_XDECREF(tmp); Line | Count | Source | 613 | 7 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5641 | 7 | return 1; |
5642 | 0 | } |
5643 | | |
5644 | | int |
5645 | | obj2ast_stmt(struct ast_state *state, PyObject* obj, stmt_ty* out, PyArena* |
5646 | | arena) |
5647 | 70.0k | { |
5648 | 70.0k | int isinstance; |
5649 | | |
5650 | 70.0k | PyObject *tmp = NULL; |
5651 | 70.0k | PyObject *tp; |
5652 | 70.0k | int lineno; |
5653 | 70.0k | int col_offset; |
5654 | 70.0k | int end_lineno; |
5655 | 70.0k | int end_col_offset; |
5656 | | |
5657 | 70.0k | if (obj == Py_None) {Line | Count | Source | 654 | 70.0k | #define Py_None (&_Py_NoneStruct) |
Branch (5657:9): [True: 1, False: 69.9k]
|
5658 | 1 | *out = NULL; |
5659 | 1 | return 0; |
5660 | 1 | } |
5661 | 69.9k | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (5661:9): [True: 0, False: 69.9k]
|
5662 | 0 | return 1; |
5663 | 0 | } |
5664 | 69.9k | if (tmp == NULL) { Branch (5664:9): [True: 1, False: 69.9k]
|
5665 | 1 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from stmt"); |
5666 | 1 | return 1; |
5667 | 1 | } |
5668 | 69.9k | else { |
5669 | 69.9k | int res; |
5670 | 69.9k | if (_Py_EnterRecursiveCall(" while traversing 'stmt' node")) { Branch (5670:13): [True: 0, False: 69.9k]
|
5671 | 0 | goto failed; |
5672 | 0 | } |
5673 | 69.9k | res = obj2ast_int(state, tmp, &lineno, arena); |
5674 | 69.9k | _Py_LeaveRecursiveCall(); |
5675 | 69.9k | if (res != 0) goto failed; Branch (5675:13): [True: 1, False: 69.9k]
|
5676 | 69.9k | Py_CLEAR(tmp); Line | Count | Source | 587 | 69.9k | do { \ | 588 | 69.9k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 69.9k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 69.9k, False: 0]
| 590 | 69.9k | (op) = NULL; \ | 591 | 69.9k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 69.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 69.9k | } \ | 593 | 69.9k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5677 | 69.9k | } |
5678 | 69.9k | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (5678:9): [True: 0, False: 69.9k]
|
5679 | 0 | return 1; |
5680 | 0 | } |
5681 | 69.9k | if (tmp == NULL) { Branch (5681:9): [True: 0, False: 69.9k]
|
5682 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from stmt"); |
5683 | 0 | return 1; |
5684 | 0 | } |
5685 | 69.9k | else { |
5686 | 69.9k | int res; |
5687 | 69.9k | if (_Py_EnterRecursiveCall(" while traversing 'stmt' node")) { Branch (5687:13): [True: 0, False: 69.9k]
|
5688 | 0 | goto failed; |
5689 | 0 | } |
5690 | 69.9k | res = obj2ast_int(state, tmp, &col_offset, arena); |
5691 | 69.9k | _Py_LeaveRecursiveCall(); |
5692 | 69.9k | if (res != 0) goto failed; Branch (5692:13): [True: 0, False: 69.9k]
|
5693 | 69.9k | Py_CLEAR(tmp); Line | Count | Source | 587 | 69.9k | do { \ | 588 | 69.9k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 69.9k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 69.9k, False: 0]
| 590 | 69.9k | (op) = NULL; \ | 591 | 69.9k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 69.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 69.9k | } \ | 593 | 69.9k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5694 | 69.9k | } |
5695 | 69.9k | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (5695:9): [True: 0, False: 69.9k]
|
5696 | 0 | return 1; |
5697 | 0 | } |
5698 | 69.9k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 69.9k | #define Py_None (&_Py_NoneStruct) |
Branch (5698:9): [True: 0, False: 69.9k]
Branch (5698:24): [True: 4, False: 69.9k]
|
5699 | 4 | Py_CLEAR(tmp); Line | Count | Source | 587 | 4 | do { \ | 588 | 4 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4, False: 0]
| 590 | 4 | (op) = NULL; \ | 591 | 4 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4 | } \ | 593 | 4 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5700 | 4 | end_lineno = lineno; |
5701 | 4 | } |
5702 | 69.9k | else { |
5703 | 69.9k | int res; |
5704 | 69.9k | if (_Py_EnterRecursiveCall(" while traversing 'stmt' node")) { Branch (5704:13): [True: 0, False: 69.9k]
|
5705 | 0 | goto failed; |
5706 | 0 | } |
5707 | 69.9k | res = obj2ast_int(state, tmp, &end_lineno, arena); |
5708 | 69.9k | _Py_LeaveRecursiveCall(); |
5709 | 69.9k | if (res != 0) goto failed; Branch (5709:13): [True: 0, False: 69.9k]
|
5710 | 69.9k | Py_CLEAR(tmp); Line | Count | Source | 587 | 69.9k | do { \ | 588 | 69.9k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 69.9k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 69.9k, False: 0]
| 590 | 69.9k | (op) = NULL; \ | 591 | 69.9k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 69.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 69.9k | } \ | 593 | 69.9k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5711 | 69.9k | } |
5712 | 69.9k | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (5712:9): [True: 0, False: 69.9k]
|
5713 | 0 | return 1; |
5714 | 0 | } |
5715 | 69.9k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 69.9k | #define Py_None (&_Py_NoneStruct) |
Branch (5715:9): [True: 0, False: 69.9k]
Branch (5715:24): [True: 4, False: 69.9k]
|
5716 | 4 | Py_CLEAR(tmp); Line | Count | Source | 587 | 4 | do { \ | 588 | 4 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4, False: 0]
| 590 | 4 | (op) = NULL; \ | 591 | 4 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4 | } \ | 593 | 4 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5717 | 4 | end_col_offset = col_offset; |
5718 | 4 | } |
5719 | 69.9k | else { |
5720 | 69.9k | int res; |
5721 | 69.9k | if (_Py_EnterRecursiveCall(" while traversing 'stmt' node")) { Branch (5721:13): [True: 0, False: 69.9k]
|
5722 | 0 | goto failed; |
5723 | 0 | } |
5724 | 69.9k | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
5725 | 69.9k | _Py_LeaveRecursiveCall(); |
5726 | 69.9k | if (res != 0) goto failed; Branch (5726:13): [True: 0, False: 69.9k]
|
5727 | 69.9k | Py_CLEAR(tmp); Line | Count | Source | 587 | 69.9k | do { \ | 588 | 69.9k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 69.9k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 69.9k, False: 0]
| 590 | 69.9k | (op) = NULL; \ | 591 | 69.9k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 69.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 69.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 69.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 69.9k | } \ | 593 | 69.9k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5728 | 69.9k | } |
5729 | 69.9k | tp = state->FunctionDef_type; |
5730 | 69.9k | isinstance = PyObject_IsInstance(obj, tp); |
5731 | 69.9k | if (isinstance == -1) { Branch (5731:9): [True: 0, False: 69.9k]
|
5732 | 0 | return 1; |
5733 | 0 | } |
5734 | 69.9k | if (isinstance) { Branch (5734:9): [True: 7.39k, False: 62.6k]
|
5735 | 7.39k | identifier name; |
5736 | 7.39k | arguments_ty args; |
5737 | 7.39k | asdl_stmt_seq* body; |
5738 | 7.39k | asdl_expr_seq* decorator_list; |
5739 | 7.39k | expr_ty returns; |
5740 | 7.39k | string type_comment; |
5741 | | |
5742 | 7.39k | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { Branch (5742:13): [True: 0, False: 7.39k]
|
5743 | 0 | return 1; |
5744 | 0 | } |
5745 | 7.39k | if (tmp == NULL) { Branch (5745:13): [True: 0, False: 7.39k]
|
5746 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from FunctionDef"); |
5747 | 0 | return 1; |
5748 | 0 | } |
5749 | 7.39k | else { |
5750 | 7.39k | int res; |
5751 | 7.39k | if (_Py_EnterRecursiveCall(" while traversing 'FunctionDef' node")) { Branch (5751:17): [True: 0, False: 7.39k]
|
5752 | 0 | goto failed; |
5753 | 0 | } |
5754 | 7.39k | res = obj2ast_identifier(state, tmp, &name, arena); |
5755 | 7.39k | _Py_LeaveRecursiveCall(); |
5756 | 7.39k | if (res != 0) goto failed; Branch (5756:17): [True: 0, False: 7.39k]
|
5757 | 7.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.39k | do { \ | 588 | 7.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.39k, False: 0]
| 590 | 7.39k | (op) = NULL; \ | 591 | 7.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.39k | } \ | 593 | 7.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5758 | 7.39k | } |
5759 | 7.39k | if (_PyObject_LookupAttr(obj, state->args, &tmp) < 0) { Branch (5759:13): [True: 0, False: 7.39k]
|
5760 | 0 | return 1; |
5761 | 0 | } |
5762 | 7.39k | if (tmp == NULL) { Branch (5762:13): [True: 0, False: 7.39k]
|
5763 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from FunctionDef"); |
5764 | 0 | return 1; |
5765 | 0 | } |
5766 | 7.39k | else { |
5767 | 7.39k | int res; |
5768 | 7.39k | if (_Py_EnterRecursiveCall(" while traversing 'FunctionDef' node")) { Branch (5768:17): [True: 0, False: 7.39k]
|
5769 | 0 | goto failed; |
5770 | 0 | } |
5771 | 7.39k | res = obj2ast_arguments(state, tmp, &args, arena); |
5772 | 7.39k | _Py_LeaveRecursiveCall(); |
5773 | 7.39k | if (res != 0) goto failed; Branch (5773:17): [True: 0, False: 7.39k]
|
5774 | 7.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.39k | do { \ | 588 | 7.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.39k, False: 0]
| 590 | 7.39k | (op) = NULL; \ | 591 | 7.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.39k | } \ | 593 | 7.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5775 | 7.39k | } |
5776 | 7.39k | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (5776:13): [True: 0, False: 7.39k]
|
5777 | 0 | return 1; |
5778 | 0 | } |
5779 | 7.39k | if (tmp == NULL) { Branch (5779:13): [True: 0, False: 7.39k]
|
5780 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from FunctionDef"); |
5781 | 0 | return 1; |
5782 | 0 | } |
5783 | 7.39k | else { |
5784 | 7.39k | int res; |
5785 | 7.39k | Py_ssize_t len; |
5786 | 7.39k | Py_ssize_t i; |
5787 | 7.39k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.39k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.39k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5787:17): [True: 0, False: 7.39k]
|
5788 | 0 | PyErr_Format(PyExc_TypeError, "FunctionDef field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5789 | 0 | goto failed; |
5790 | 0 | } |
5791 | 7.39k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.39k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5792 | 7.39k | body = _Py_asdl_stmt_seq_new(len, arena); |
5793 | 7.39k | if (body == NULL) goto failed; Branch (5793:17): [True: 0, False: 7.39k]
|
5794 | 34.4k | for (i = 0; i < len; i++) { Branch (5794:25): [True: 27.0k, False: 7.39k]
|
5795 | 27.0k | stmt_ty val; |
5796 | 27.0k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 27.0k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 27.0k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 27.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5797 | 27.0k | Py_INCREF(tmp2); Line | Count | Source | 512 | 27.0k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 27.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 27.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5798 | 27.0k | if (_Py_EnterRecursiveCall(" while traversing 'FunctionDef' node")) { Branch (5798:21): [True: 0, False: 27.0k]
|
5799 | 0 | goto failed; |
5800 | 0 | } |
5801 | 27.0k | res = obj2ast_stmt(state, tmp2, &val, arena); |
5802 | 27.0k | _Py_LeaveRecursiveCall(); |
5803 | 27.0k | Py_DECREF(tmp2); Line | Count | Source | 548 | 27.0k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 27.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 27.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5804 | 27.0k | if (res != 0) goto failed; Branch (5804:21): [True: 1, False: 27.0k]
|
5805 | 27.0k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 27.0k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 27.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 27.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5805:21): [True: 0, False: 27.0k]
|
5806 | 0 | PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"body\" changed size during iteration"); |
5807 | 0 | goto failed; |
5808 | 0 | } |
5809 | 27.0k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 27.0k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 27.0k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5810 | 27.0k | } |
5811 | 7.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.39k | do { \ | 588 | 7.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.39k, False: 0]
| 590 | 7.39k | (op) = NULL; \ | 591 | 7.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.39k | } \ | 593 | 7.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5812 | 7.39k | } |
5813 | 7.39k | if (_PyObject_LookupAttr(obj, state->decorator_list, &tmp) < 0) { Branch (5813:13): [True: 0, False: 7.39k]
|
5814 | 0 | return 1; |
5815 | 0 | } |
5816 | 7.39k | if (tmp == NULL) { Branch (5816:13): [True: 0, False: 7.39k]
|
5817 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from FunctionDef"); |
5818 | 0 | return 1; |
5819 | 0 | } |
5820 | 7.39k | else { |
5821 | 7.39k | int res; |
5822 | 7.39k | Py_ssize_t len; |
5823 | 7.39k | Py_ssize_t i; |
5824 | 7.39k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.39k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.39k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5824:17): [True: 0, False: 7.39k]
|
5825 | 0 | PyErr_Format(PyExc_TypeError, "FunctionDef field \"decorator_list\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5826 | 0 | goto failed; |
5827 | 0 | } |
5828 | 7.39k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.39k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5829 | 7.39k | decorator_list = _Py_asdl_expr_seq_new(len, arena); |
5830 | 7.39k | if (decorator_list == NULL) goto failed; Branch (5830:17): [True: 0, False: 7.39k]
|
5831 | 8.01k | for (i = 0; i < len; i++) { Branch (5831:25): [True: 620, False: 7.39k]
|
5832 | 620 | expr_ty val; |
5833 | 620 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 620 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 620 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 620 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5834 | 620 | Py_INCREF(tmp2); Line | Count | Source | 512 | 620 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 620 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 620 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5835 | 620 | if (_Py_EnterRecursiveCall(" while traversing 'FunctionDef' node")) { Branch (5835:21): [True: 0, False: 620]
|
5836 | 0 | goto failed; |
5837 | 0 | } |
5838 | 620 | res = obj2ast_expr(state, tmp2, &val, arena); |
5839 | 620 | _Py_LeaveRecursiveCall(); |
5840 | 620 | Py_DECREF(tmp2); Line | Count | Source | 548 | 620 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 620 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 620 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5841 | 620 | if (res != 0) goto failed; Branch (5841:21): [True: 0, False: 620]
|
5842 | 620 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 620 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 620 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 620 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5842:21): [True: 0, False: 620]
|
5843 | 0 | PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"decorator_list\" changed size during iteration"); |
5844 | 0 | goto failed; |
5845 | 0 | } |
5846 | 620 | asdl_seq_SET(decorator_list, i, val); Line | Count | Source | 94 | 620 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 620 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5847 | 620 | } |
5848 | 7.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.39k | do { \ | 588 | 7.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.39k, False: 0]
| 590 | 7.39k | (op) = NULL; \ | 591 | 7.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.39k | } \ | 593 | 7.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5849 | 7.39k | } |
5850 | 7.39k | if (_PyObject_LookupAttr(obj, state->returns, &tmp) < 0) { Branch (5850:13): [True: 0, False: 7.39k]
|
5851 | 0 | return 1; |
5852 | 0 | } |
5853 | 7.39k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 7.39k | #define Py_None (&_Py_NoneStruct) |
Branch (5853:13): [True: 0, False: 7.39k]
Branch (5853:28): [True: 7.33k, False: 56]
|
5854 | 7.33k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.33k | do { \ | 588 | 7.33k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.33k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.33k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.33k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.33k, False: 0]
| 590 | 7.33k | (op) = NULL; \ | 591 | 7.33k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.33k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.33k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.33k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.33k | } \ | 593 | 7.33k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5855 | 7.33k | returns = NULL; |
5856 | 7.33k | } |
5857 | 56 | else { |
5858 | 56 | int res; |
5859 | 56 | if (_Py_EnterRecursiveCall(" while traversing 'FunctionDef' node")) { Branch (5859:17): [True: 0, False: 56]
|
5860 | 0 | goto failed; |
5861 | 0 | } |
5862 | 56 | res = obj2ast_expr(state, tmp, &returns, arena); |
5863 | 56 | _Py_LeaveRecursiveCall(); |
5864 | 56 | if (res != 0) goto failed; Branch (5864:17): [True: 0, False: 56]
|
5865 | 56 | Py_CLEAR(tmp); Line | Count | Source | 587 | 56 | do { \ | 588 | 56 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 56 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 56 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 56 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 56, False: 0]
| 590 | 56 | (op) = NULL; \ | 591 | 56 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 56 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 56 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 56 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 56 | } \ | 593 | 56 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5866 | 56 | } |
5867 | 7.39k | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (5867:13): [True: 0, False: 7.39k]
|
5868 | 0 | return 1; |
5869 | 0 | } |
5870 | 7.39k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 7.39k | #define Py_None (&_Py_NoneStruct) |
Branch (5870:13): [True: 0, False: 7.39k]
Branch (5870:28): [True: 7.39k, False: 0]
|
5871 | 7.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.39k | do { \ | 588 | 7.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.39k, False: 0]
| 590 | 7.39k | (op) = NULL; \ | 591 | 7.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.39k | } \ | 593 | 7.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5872 | 7.39k | type_comment = NULL; |
5873 | 7.39k | } |
5874 | 0 | else { |
5875 | 0 | int res; |
5876 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'FunctionDef' node")) { Branch (5876:17): [True: 0, False: 0]
|
5877 | 0 | goto failed; |
5878 | 0 | } |
5879 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
5880 | 0 | _Py_LeaveRecursiveCall(); |
5881 | 0 | if (res != 0) goto failed; Branch (5881:17): [True: 0, False: 0]
|
5882 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5883 | 0 | } |
5884 | 7.39k | *out = _PyAST_FunctionDef(name, args, body, decorator_list, returns, |
5885 | 7.39k | type_comment, lineno, col_offset, end_lineno, |
5886 | 7.39k | end_col_offset, arena); |
5887 | 7.39k | if (*out == NULL) goto failed; Branch (5887:13): [True: 0, False: 7.39k]
|
5888 | 7.39k | return 0; |
5889 | 7.39k | } |
5890 | 62.6k | tp = state->AsyncFunctionDef_type; |
5891 | 62.6k | isinstance = PyObject_IsInstance(obj, tp); |
5892 | 62.6k | if (isinstance == -1) { Branch (5892:9): [True: 0, False: 62.6k]
|
5893 | 0 | return 1; |
5894 | 0 | } |
5895 | 62.6k | if (isinstance) { Branch (5895:9): [True: 41, False: 62.5k]
|
5896 | 41 | identifier name; |
5897 | 41 | arguments_ty args; |
5898 | 41 | asdl_stmt_seq* body; |
5899 | 41 | asdl_expr_seq* decorator_list; |
5900 | 41 | expr_ty returns; |
5901 | 41 | string type_comment; |
5902 | | |
5903 | 41 | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { Branch (5903:13): [True: 0, False: 41]
|
5904 | 0 | return 1; |
5905 | 0 | } |
5906 | 41 | if (tmp == NULL) { Branch (5906:13): [True: 0, False: 41]
|
5907 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from AsyncFunctionDef"); |
5908 | 0 | return 1; |
5909 | 0 | } |
5910 | 41 | else { |
5911 | 41 | int res; |
5912 | 41 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFunctionDef' node")) { Branch (5912:17): [True: 0, False: 41]
|
5913 | 0 | goto failed; |
5914 | 0 | } |
5915 | 41 | res = obj2ast_identifier(state, tmp, &name, arena); |
5916 | 41 | _Py_LeaveRecursiveCall(); |
5917 | 41 | if (res != 0) goto failed; Branch (5917:17): [True: 0, False: 41]
|
5918 | 41 | Py_CLEAR(tmp); Line | Count | Source | 587 | 41 | do { \ | 588 | 41 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 41 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 41, False: 0]
| 590 | 41 | (op) = NULL; \ | 591 | 41 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 41 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 41 | } \ | 593 | 41 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5919 | 41 | } |
5920 | 41 | if (_PyObject_LookupAttr(obj, state->args, &tmp) < 0) { Branch (5920:13): [True: 0, False: 41]
|
5921 | 0 | return 1; |
5922 | 0 | } |
5923 | 41 | if (tmp == NULL) { Branch (5923:13): [True: 0, False: 41]
|
5924 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from AsyncFunctionDef"); |
5925 | 0 | return 1; |
5926 | 0 | } |
5927 | 41 | else { |
5928 | 41 | int res; |
5929 | 41 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFunctionDef' node")) { Branch (5929:17): [True: 0, False: 41]
|
5930 | 0 | goto failed; |
5931 | 0 | } |
5932 | 41 | res = obj2ast_arguments(state, tmp, &args, arena); |
5933 | 41 | _Py_LeaveRecursiveCall(); |
5934 | 41 | if (res != 0) goto failed; Branch (5934:17): [True: 0, False: 41]
|
5935 | 41 | Py_CLEAR(tmp); Line | Count | Source | 587 | 41 | do { \ | 588 | 41 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 41 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 41, False: 0]
| 590 | 41 | (op) = NULL; \ | 591 | 41 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 41 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 41 | } \ | 593 | 41 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5936 | 41 | } |
5937 | 41 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (5937:13): [True: 0, False: 41]
|
5938 | 0 | return 1; |
5939 | 0 | } |
5940 | 41 | if (tmp == NULL) { Branch (5940:13): [True: 0, False: 41]
|
5941 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncFunctionDef"); |
5942 | 0 | return 1; |
5943 | 0 | } |
5944 | 41 | else { |
5945 | 41 | int res; |
5946 | 41 | Py_ssize_t len; |
5947 | 41 | Py_ssize_t i; |
5948 | 41 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 41 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 41 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5948:17): [True: 0, False: 41]
|
5949 | 0 | PyErr_Format(PyExc_TypeError, "AsyncFunctionDef field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5950 | 0 | goto failed; |
5951 | 0 | } |
5952 | 41 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 41 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5953 | 41 | body = _Py_asdl_stmt_seq_new(len, arena); |
5954 | 41 | if (body == NULL) goto failed; Branch (5954:17): [True: 0, False: 41]
|
5955 | 117 | for (i = 0; i < len; i++) { Branch (5955:25): [True: 76, False: 41]
|
5956 | 76 | stmt_ty val; |
5957 | 76 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 76 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 76 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 76 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5958 | 76 | Py_INCREF(tmp2); Line | Count | Source | 512 | 76 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 76 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 76 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5959 | 76 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFunctionDef' node")) { Branch (5959:21): [True: 0, False: 76]
|
5960 | 0 | goto failed; |
5961 | 0 | } |
5962 | 76 | res = obj2ast_stmt(state, tmp2, &val, arena); |
5963 | 76 | _Py_LeaveRecursiveCall(); |
5964 | 76 | Py_DECREF(tmp2); Line | Count | Source | 548 | 76 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 76 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 76 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5965 | 76 | if (res != 0) goto failed; Branch (5965:21): [True: 0, False: 76]
|
5966 | 76 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 76 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 76 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 76 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (5966:21): [True: 0, False: 76]
|
5967 | 0 | PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"body\" changed size during iteration"); |
5968 | 0 | goto failed; |
5969 | 0 | } |
5970 | 76 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 76 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 76 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
5971 | 76 | } |
5972 | 41 | Py_CLEAR(tmp); Line | Count | Source | 587 | 41 | do { \ | 588 | 41 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 41 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 41, False: 0]
| 590 | 41 | (op) = NULL; \ | 591 | 41 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 41 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 41 | } \ | 593 | 41 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
5973 | 41 | } |
5974 | 41 | if (_PyObject_LookupAttr(obj, state->decorator_list, &tmp) < 0) { Branch (5974:13): [True: 0, False: 41]
|
5975 | 0 | return 1; |
5976 | 0 | } |
5977 | 41 | if (tmp == NULL) { Branch (5977:13): [True: 0, False: 41]
|
5978 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from AsyncFunctionDef"); |
5979 | 0 | return 1; |
5980 | 0 | } |
5981 | 41 | else { |
5982 | 41 | int res; |
5983 | 41 | Py_ssize_t len; |
5984 | 41 | Py_ssize_t i; |
5985 | 41 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 41 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 41 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (5985:17): [True: 0, False: 41]
|
5986 | 0 | PyErr_Format(PyExc_TypeError, "AsyncFunctionDef field \"decorator_list\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5987 | 0 | goto failed; |
5988 | 0 | } |
5989 | 41 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 41 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5990 | 41 | decorator_list = _Py_asdl_expr_seq_new(len, arena); |
5991 | 41 | if (decorator_list == NULL) goto failed; Branch (5991:17): [True: 0, False: 41]
|
5992 | 53 | for (i = 0; i < len; i++) { Branch (5992:25): [True: 12, False: 41]
|
5993 | 12 | expr_ty val; |
5994 | 12 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 12 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 12 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5995 | 12 | Py_INCREF(tmp2); Line | Count | Source | 512 | 12 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
5996 | 12 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFunctionDef' node")) { Branch (5996:21): [True: 0, False: 12]
|
5997 | 0 | goto failed; |
5998 | 0 | } |
5999 | 12 | res = obj2ast_expr(state, tmp2, &val, arena); |
6000 | 12 | _Py_LeaveRecursiveCall(); |
6001 | 12 | Py_DECREF(tmp2); Line | Count | Source | 548 | 12 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6002 | 12 | if (res != 0) goto failed; Branch (6002:21): [True: 0, False: 12]
|
6003 | 12 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 12 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6003:21): [True: 0, False: 12]
|
6004 | 0 | PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"decorator_list\" changed size during iteration"); |
6005 | 0 | goto failed; |
6006 | 0 | } |
6007 | 12 | asdl_seq_SET(decorator_list, i, val); Line | Count | Source | 94 | 12 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 12 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6008 | 12 | } |
6009 | 41 | Py_CLEAR(tmp); Line | Count | Source | 587 | 41 | do { \ | 588 | 41 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 41 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 41, False: 0]
| 590 | 41 | (op) = NULL; \ | 591 | 41 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 41 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 41 | } \ | 593 | 41 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6010 | 41 | } |
6011 | 41 | if (_PyObject_LookupAttr(obj, state->returns, &tmp) < 0) { Branch (6011:13): [True: 0, False: 41]
|
6012 | 0 | return 1; |
6013 | 0 | } |
6014 | 41 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 41 | #define Py_None (&_Py_NoneStruct) |
Branch (6014:13): [True: 0, False: 41]
Branch (6014:28): [True: 41, False: 0]
|
6015 | 41 | Py_CLEAR(tmp); Line | Count | Source | 587 | 41 | do { \ | 588 | 41 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 41 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 41, False: 0]
| 590 | 41 | (op) = NULL; \ | 591 | 41 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 41 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 41 | } \ | 593 | 41 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6016 | 41 | returns = NULL; |
6017 | 41 | } |
6018 | 0 | else { |
6019 | 0 | int res; |
6020 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFunctionDef' node")) { Branch (6020:17): [True: 0, False: 0]
|
6021 | 0 | goto failed; |
6022 | 0 | } |
6023 | 0 | res = obj2ast_expr(state, tmp, &returns, arena); |
6024 | 0 | _Py_LeaveRecursiveCall(); |
6025 | 0 | if (res != 0) goto failed; Branch (6025:17): [True: 0, False: 0]
|
6026 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6027 | 0 | } |
6028 | 41 | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (6028:13): [True: 0, False: 41]
|
6029 | 0 | return 1; |
6030 | 0 | } |
6031 | 41 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 41 | #define Py_None (&_Py_NoneStruct) |
Branch (6031:13): [True: 0, False: 41]
Branch (6031:28): [True: 41, False: 0]
|
6032 | 41 | Py_CLEAR(tmp); Line | Count | Source | 587 | 41 | do { \ | 588 | 41 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 41 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 41, False: 0]
| 590 | 41 | (op) = NULL; \ | 591 | 41 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 41 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 41 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 41 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 41 | } \ | 593 | 41 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6033 | 41 | type_comment = NULL; |
6034 | 41 | } |
6035 | 0 | else { |
6036 | 0 | int res; |
6037 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFunctionDef' node")) { Branch (6037:17): [True: 0, False: 0]
|
6038 | 0 | goto failed; |
6039 | 0 | } |
6040 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
6041 | 0 | _Py_LeaveRecursiveCall(); |
6042 | 0 | if (res != 0) goto failed; Branch (6042:17): [True: 0, False: 0]
|
6043 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6044 | 0 | } |
6045 | 41 | *out = _PyAST_AsyncFunctionDef(name, args, body, decorator_list, |
6046 | 41 | returns, type_comment, lineno, |
6047 | 41 | col_offset, end_lineno, end_col_offset, |
6048 | 41 | arena); |
6049 | 41 | if (*out == NULL) goto failed; Branch (6049:13): [True: 0, False: 41]
|
6050 | 41 | return 0; |
6051 | 41 | } |
6052 | 62.5k | tp = state->ClassDef_type; |
6053 | 62.5k | isinstance = PyObject_IsInstance(obj, tp); |
6054 | 62.5k | if (isinstance == -1) { Branch (6054:9): [True: 0, False: 62.5k]
|
6055 | 0 | return 1; |
6056 | 0 | } |
6057 | 62.5k | if (isinstance) { Branch (6057:9): [True: 830, False: 61.7k]
|
6058 | 830 | identifier name; |
6059 | 830 | asdl_expr_seq* bases; |
6060 | 830 | asdl_keyword_seq* keywords; |
6061 | 830 | asdl_stmt_seq* body; |
6062 | 830 | asdl_expr_seq* decorator_list; |
6063 | | |
6064 | 830 | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { Branch (6064:13): [True: 0, False: 830]
|
6065 | 0 | return 1; |
6066 | 0 | } |
6067 | 830 | if (tmp == NULL) { Branch (6067:13): [True: 0, False: 830]
|
6068 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from ClassDef"); |
6069 | 0 | return 1; |
6070 | 0 | } |
6071 | 830 | else { |
6072 | 830 | int res; |
6073 | 830 | if (_Py_EnterRecursiveCall(" while traversing 'ClassDef' node")) { Branch (6073:17): [True: 0, False: 830]
|
6074 | 0 | goto failed; |
6075 | 0 | } |
6076 | 830 | res = obj2ast_identifier(state, tmp, &name, arena); |
6077 | 830 | _Py_LeaveRecursiveCall(); |
6078 | 830 | if (res != 0) goto failed; Branch (6078:17): [True: 0, False: 830]
|
6079 | 830 | Py_CLEAR(tmp); Line | Count | Source | 587 | 830 | do { \ | 588 | 830 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 830 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 830, False: 0]
| 590 | 830 | (op) = NULL; \ | 591 | 830 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 830 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 830 | } \ | 593 | 830 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6080 | 830 | } |
6081 | 830 | if (_PyObject_LookupAttr(obj, state->bases, &tmp) < 0) { Branch (6081:13): [True: 0, False: 830]
|
6082 | 0 | return 1; |
6083 | 0 | } |
6084 | 830 | if (tmp == NULL) { Branch (6084:13): [True: 0, False: 830]
|
6085 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"bases\" missing from ClassDef"); |
6086 | 0 | return 1; |
6087 | 0 | } |
6088 | 830 | else { |
6089 | 830 | int res; |
6090 | 830 | Py_ssize_t len; |
6091 | 830 | Py_ssize_t i; |
6092 | 830 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 830 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 830 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6092:17): [True: 0, False: 830]
|
6093 | 0 | PyErr_Format(PyExc_TypeError, "ClassDef field \"bases\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6094 | 0 | goto failed; |
6095 | 0 | } |
6096 | 830 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 830 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6097 | 830 | bases = _Py_asdl_expr_seq_new(len, arena); |
6098 | 830 | if (bases == NULL) goto failed; Branch (6098:17): [True: 0, False: 830]
|
6099 | 1.44k | for (i = 0; i < len; i++) { Branch (6099:25): [True: 615, False: 830]
|
6100 | 615 | expr_ty val; |
6101 | 615 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 615 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 615 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 615 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6102 | 615 | Py_INCREF(tmp2); Line | Count | Source | 512 | 615 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 615 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 615 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6103 | 615 | if (_Py_EnterRecursiveCall(" while traversing 'ClassDef' node")) { Branch (6103:21): [True: 0, False: 615]
|
6104 | 0 | goto failed; |
6105 | 0 | } |
6106 | 615 | res = obj2ast_expr(state, tmp2, &val, arena); |
6107 | 615 | _Py_LeaveRecursiveCall(); |
6108 | 615 | Py_DECREF(tmp2); Line | Count | Source | 548 | 615 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 615 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 615 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6109 | 615 | if (res != 0) goto failed; Branch (6109:21): [True: 0, False: 615]
|
6110 | 615 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 615 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 615 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 615 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6110:21): [True: 0, False: 615]
|
6111 | 0 | PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"bases\" changed size during iteration"); |
6112 | 0 | goto failed; |
6113 | 0 | } |
6114 | 615 | asdl_seq_SET(bases, i, val); Line | Count | Source | 94 | 615 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 615 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6115 | 615 | } |
6116 | 830 | Py_CLEAR(tmp); Line | Count | Source | 587 | 830 | do { \ | 588 | 830 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 830 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 830, False: 0]
| 590 | 830 | (op) = NULL; \ | 591 | 830 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 830 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 830 | } \ | 593 | 830 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6117 | 830 | } |
6118 | 830 | if (_PyObject_LookupAttr(obj, state->keywords, &tmp) < 0) { Branch (6118:13): [True: 0, False: 830]
|
6119 | 0 | return 1; |
6120 | 0 | } |
6121 | 830 | if (tmp == NULL) { Branch (6121:13): [True: 0, False: 830]
|
6122 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from ClassDef"); |
6123 | 0 | return 1; |
6124 | 0 | } |
6125 | 830 | else { |
6126 | 830 | int res; |
6127 | 830 | Py_ssize_t len; |
6128 | 830 | Py_ssize_t i; |
6129 | 830 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 830 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 830 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6129:17): [True: 0, False: 830]
|
6130 | 0 | PyErr_Format(PyExc_TypeError, "ClassDef field \"keywords\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6131 | 0 | goto failed; |
6132 | 0 | } |
6133 | 830 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 830 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6134 | 830 | keywords = _Py_asdl_keyword_seq_new(len, arena); |
6135 | 830 | if (keywords == NULL) goto failed; Branch (6135:17): [True: 0, False: 830]
|
6136 | 875 | for (i = 0; i < len; i++) { Branch (6136:25): [True: 45, False: 830]
|
6137 | 45 | keyword_ty val; |
6138 | 45 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 45 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 45 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 45 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6139 | 45 | Py_INCREF(tmp2); Line | Count | Source | 512 | 45 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 45 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 45 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6140 | 45 | if (_Py_EnterRecursiveCall(" while traversing 'ClassDef' node")) { Branch (6140:21): [True: 0, False: 45]
|
6141 | 0 | goto failed; |
6142 | 0 | } |
6143 | 45 | res = obj2ast_keyword(state, tmp2, &val, arena); |
6144 | 45 | _Py_LeaveRecursiveCall(); |
6145 | 45 | Py_DECREF(tmp2); Line | Count | Source | 548 | 45 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 45 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 45 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6146 | 45 | if (res != 0) goto failed; Branch (6146:21): [True: 0, False: 45]
|
6147 | 45 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 45 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 45 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 45 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6147:21): [True: 0, False: 45]
|
6148 | 0 | PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"keywords\" changed size during iteration"); |
6149 | 0 | goto failed; |
6150 | 0 | } |
6151 | 45 | asdl_seq_SET(keywords, i, val); Line | Count | Source | 94 | 45 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 45 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6152 | 45 | } |
6153 | 830 | Py_CLEAR(tmp); Line | Count | Source | 587 | 830 | do { \ | 588 | 830 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 830 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 830, False: 0]
| 590 | 830 | (op) = NULL; \ | 591 | 830 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 830 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 830 | } \ | 593 | 830 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6154 | 830 | } |
6155 | 830 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (6155:13): [True: 0, False: 830]
|
6156 | 0 | return 1; |
6157 | 0 | } |
6158 | 830 | if (tmp == NULL) { Branch (6158:13): [True: 0, False: 830]
|
6159 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ClassDef"); |
6160 | 0 | return 1; |
6161 | 0 | } |
6162 | 830 | else { |
6163 | 830 | int res; |
6164 | 830 | Py_ssize_t len; |
6165 | 830 | Py_ssize_t i; |
6166 | 830 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 830 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 830 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6166:17): [True: 0, False: 830]
|
6167 | 0 | PyErr_Format(PyExc_TypeError, "ClassDef field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6168 | 0 | goto failed; |
6169 | 0 | } |
6170 | 830 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 830 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6171 | 830 | body = _Py_asdl_stmt_seq_new(len, arena); |
6172 | 830 | if (body == NULL) goto failed; Branch (6172:17): [True: 0, False: 830]
|
6173 | 7.70k | for (i = 0; i < len; i++) { Branch (6173:25): [True: 6.87k, False: 830]
|
6174 | 6.87k | stmt_ty val; |
6175 | 6.87k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 6.87k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 6.87k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 6.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6176 | 6.87k | Py_INCREF(tmp2); Line | Count | Source | 512 | 6.87k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.87k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6177 | 6.87k | if (_Py_EnterRecursiveCall(" while traversing 'ClassDef' node")) { Branch (6177:21): [True: 0, False: 6.87k]
|
6178 | 0 | goto failed; |
6179 | 0 | } |
6180 | 6.87k | res = obj2ast_stmt(state, tmp2, &val, arena); |
6181 | 6.87k | _Py_LeaveRecursiveCall(); |
6182 | 6.87k | Py_DECREF(tmp2); Line | Count | Source | 548 | 6.87k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.87k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6183 | 6.87k | if (res != 0) goto failed; Branch (6183:21): [True: 0, False: 6.87k]
|
6184 | 6.87k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 6.87k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.87k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6184:21): [True: 0, False: 6.87k]
|
6185 | 0 | PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"body\" changed size during iteration"); |
6186 | 0 | goto failed; |
6187 | 0 | } |
6188 | 6.87k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 6.87k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 6.87k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6189 | 6.87k | } |
6190 | 830 | Py_CLEAR(tmp); Line | Count | Source | 587 | 830 | do { \ | 588 | 830 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 830 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 830, False: 0]
| 590 | 830 | (op) = NULL; \ | 591 | 830 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 830 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 830 | } \ | 593 | 830 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6191 | 830 | } |
6192 | 830 | if (_PyObject_LookupAttr(obj, state->decorator_list, &tmp) < 0) { Branch (6192:13): [True: 0, False: 830]
|
6193 | 0 | return 1; |
6194 | 0 | } |
6195 | 830 | if (tmp == NULL) { Branch (6195:13): [True: 0, False: 830]
|
6196 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from ClassDef"); |
6197 | 0 | return 1; |
6198 | 0 | } |
6199 | 830 | else { |
6200 | 830 | int res; |
6201 | 830 | Py_ssize_t len; |
6202 | 830 | Py_ssize_t i; |
6203 | 830 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 830 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 830 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6203:17): [True: 0, False: 830]
|
6204 | 0 | PyErr_Format(PyExc_TypeError, "ClassDef field \"decorator_list\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6205 | 0 | goto failed; |
6206 | 0 | } |
6207 | 830 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 830 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6208 | 830 | decorator_list = _Py_asdl_expr_seq_new(len, arena); |
6209 | 830 | if (decorator_list == NULL) goto failed; Branch (6209:17): [True: 0, False: 830]
|
6210 | 866 | for (i = 0; i < len; i++) { Branch (6210:25): [True: 36, False: 830]
|
6211 | 36 | expr_ty val; |
6212 | 36 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 36 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 36 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 36 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6213 | 36 | Py_INCREF(tmp2); Line | Count | Source | 512 | 36 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 36 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6214 | 36 | if (_Py_EnterRecursiveCall(" while traversing 'ClassDef' node")) { Branch (6214:21): [True: 0, False: 36]
|
6215 | 0 | goto failed; |
6216 | 0 | } |
6217 | 36 | res = obj2ast_expr(state, tmp2, &val, arena); |
6218 | 36 | _Py_LeaveRecursiveCall(); |
6219 | 36 | Py_DECREF(tmp2); Line | Count | Source | 548 | 36 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 36 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6220 | 36 | if (res != 0) goto failed; Branch (6220:21): [True: 0, False: 36]
|
6221 | 36 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 36 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 36 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6221:21): [True: 0, False: 36]
|
6222 | 0 | PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"decorator_list\" changed size during iteration"); |
6223 | 0 | goto failed; |
6224 | 0 | } |
6225 | 36 | asdl_seq_SET(decorator_list, i, val); Line | Count | Source | 94 | 36 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 36 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6226 | 36 | } |
6227 | 830 | Py_CLEAR(tmp); Line | Count | Source | 587 | 830 | do { \ | 588 | 830 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 830 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 830, False: 0]
| 590 | 830 | (op) = NULL; \ | 591 | 830 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 830 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 830 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 830 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 830 | } \ | 593 | 830 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6228 | 830 | } |
6229 | 830 | *out = _PyAST_ClassDef(name, bases, keywords, body, decorator_list, |
6230 | 830 | lineno, col_offset, end_lineno, end_col_offset, |
6231 | 830 | arena); |
6232 | 830 | if (*out == NULL) goto failed; Branch (6232:13): [True: 0, False: 830]
|
6233 | 830 | return 0; |
6234 | 830 | } |
6235 | 61.7k | tp = state->Return_type; |
6236 | 61.7k | isinstance = PyObject_IsInstance(obj, tp); |
6237 | 61.7k | if (isinstance == -1) { Branch (6237:9): [True: 0, False: 61.7k]
|
6238 | 0 | return 1; |
6239 | 0 | } |
6240 | 61.7k | if (isinstance) { Branch (6240:9): [True: 7.06k, False: 54.6k]
|
6241 | 7.06k | expr_ty value; |
6242 | | |
6243 | 7.06k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (6243:13): [True: 0, False: 7.06k]
|
6244 | 0 | return 1; |
6245 | 0 | } |
6246 | 7.06k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 7.06k | #define Py_None (&_Py_NoneStruct) |
Branch (6246:13): [True: 0, False: 7.06k]
Branch (6246:28): [True: 340, False: 6.72k]
|
6247 | 340 | Py_CLEAR(tmp); Line | Count | Source | 587 | 340 | do { \ | 588 | 340 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 340 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 340 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 340 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 340, False: 0]
| 590 | 340 | (op) = NULL; \ | 591 | 340 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 340 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 340 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 340 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 340 | } \ | 593 | 340 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6248 | 340 | value = NULL; |
6249 | 340 | } |
6250 | 6.72k | else { |
6251 | 6.72k | int res; |
6252 | 6.72k | if (_Py_EnterRecursiveCall(" while traversing 'Return' node")) { Branch (6252:17): [True: 0, False: 6.72k]
|
6253 | 0 | goto failed; |
6254 | 0 | } |
6255 | 6.72k | res = obj2ast_expr(state, tmp, &value, arena); |
6256 | 6.72k | _Py_LeaveRecursiveCall(); |
6257 | 6.72k | if (res != 0) goto failed; Branch (6257:17): [True: 0, False: 6.72k]
|
6258 | 6.72k | Py_CLEAR(tmp); Line | Count | Source | 587 | 6.72k | do { \ | 588 | 6.72k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6.72k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6.72k, False: 0]
| 590 | 6.72k | (op) = NULL; \ | 591 | 6.72k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6.72k | } \ | 593 | 6.72k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6259 | 6.72k | } |
6260 | 7.06k | *out = _PyAST_Return(value, lineno, col_offset, end_lineno, |
6261 | 7.06k | end_col_offset, arena); |
6262 | 7.06k | if (*out == NULL) goto failed; Branch (6262:13): [True: 0, False: 7.06k]
|
6263 | 7.06k | return 0; |
6264 | 7.06k | } |
6265 | 54.6k | tp = state->Delete_type; |
6266 | 54.6k | isinstance = PyObject_IsInstance(obj, tp); |
6267 | 54.6k | if (isinstance == -1) { Branch (6267:9): [True: 0, False: 54.6k]
|
6268 | 0 | return 1; |
6269 | 0 | } |
6270 | 54.6k | if (isinstance) { Branch (6270:9): [True: 223, False: 54.4k]
|
6271 | 223 | asdl_expr_seq* targets; |
6272 | | |
6273 | 223 | if (_PyObject_LookupAttr(obj, state->targets, &tmp) < 0) { Branch (6273:13): [True: 0, False: 223]
|
6274 | 0 | return 1; |
6275 | 0 | } |
6276 | 223 | if (tmp == NULL) { Branch (6276:13): [True: 0, False: 223]
|
6277 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"targets\" missing from Delete"); |
6278 | 0 | return 1; |
6279 | 0 | } |
6280 | 223 | else { |
6281 | 223 | int res; |
6282 | 223 | Py_ssize_t len; |
6283 | 223 | Py_ssize_t i; |
6284 | 223 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 223 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 223 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6284:17): [True: 0, False: 223]
|
6285 | 0 | PyErr_Format(PyExc_TypeError, "Delete field \"targets\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6286 | 0 | goto failed; |
6287 | 0 | } |
6288 | 223 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 223 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 223 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 223 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6289 | 223 | targets = _Py_asdl_expr_seq_new(len, arena); |
6290 | 223 | if (targets == NULL) goto failed; Branch (6290:17): [True: 0, False: 223]
|
6291 | 489 | for (i = 0; i < len; i++) { Branch (6291:25): [True: 266, False: 223]
|
6292 | 266 | expr_ty val; |
6293 | 266 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 266 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 266 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 266 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6294 | 266 | Py_INCREF(tmp2); Line | Count | Source | 512 | 266 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 266 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 266 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6295 | 266 | if (_Py_EnterRecursiveCall(" while traversing 'Delete' node")) { Branch (6295:21): [True: 0, False: 266]
|
6296 | 0 | goto failed; |
6297 | 0 | } |
6298 | 266 | res = obj2ast_expr(state, tmp2, &val, arena); |
6299 | 266 | _Py_LeaveRecursiveCall(); |
6300 | 266 | Py_DECREF(tmp2); Line | Count | Source | 548 | 266 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 266 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 266 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6301 | 266 | if (res != 0) goto failed; Branch (6301:21): [True: 0, False: 266]
|
6302 | 266 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 266 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 266 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 266 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6302:21): [True: 0, False: 266]
|
6303 | 0 | PyErr_SetString(PyExc_RuntimeError, "Delete field \"targets\" changed size during iteration"); |
6304 | 0 | goto failed; |
6305 | 0 | } |
6306 | 266 | asdl_seq_SET(targets, i, val); Line | Count | Source | 94 | 266 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 266 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6307 | 266 | } |
6308 | 223 | Py_CLEAR(tmp); Line | Count | Source | 587 | 223 | do { \ | 588 | 223 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 223 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 223 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 223 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 223, False: 0]
| 590 | 223 | (op) = NULL; \ | 591 | 223 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 223 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 223 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 223 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 223 | } \ | 593 | 223 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6309 | 223 | } |
6310 | 223 | *out = _PyAST_Delete(targets, lineno, col_offset, end_lineno, |
6311 | 223 | end_col_offset, arena); |
6312 | 223 | if (*out == NULL) goto failed; Branch (6312:13): [True: 0, False: 223]
|
6313 | 223 | return 0; |
6314 | 223 | } |
6315 | 54.4k | tp = state->Assign_type; |
6316 | 54.4k | isinstance = PyObject_IsInstance(obj, tp); |
6317 | 54.4k | if (isinstance == -1) { Branch (6317:9): [True: 0, False: 54.4k]
|
6318 | 0 | return 1; |
6319 | 0 | } |
6320 | 54.4k | if (isinstance) { Branch (6320:9): [True: 20.8k, False: 33.5k]
|
6321 | 20.8k | asdl_expr_seq* targets; |
6322 | 20.8k | expr_ty value; |
6323 | 20.8k | string type_comment; |
6324 | | |
6325 | 20.8k | if (_PyObject_LookupAttr(obj, state->targets, &tmp) < 0) { Branch (6325:13): [True: 0, False: 20.8k]
|
6326 | 0 | return 1; |
6327 | 0 | } |
6328 | 20.8k | if (tmp == NULL) { Branch (6328:13): [True: 0, False: 20.8k]
|
6329 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"targets\" missing from Assign"); |
6330 | 0 | return 1; |
6331 | 0 | } |
6332 | 20.8k | else { |
6333 | 20.8k | int res; |
6334 | 20.8k | Py_ssize_t len; |
6335 | 20.8k | Py_ssize_t i; |
6336 | 20.8k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 20.8k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 20.8k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6336:17): [True: 0, False: 20.8k]
|
6337 | 0 | PyErr_Format(PyExc_TypeError, "Assign field \"targets\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6338 | 0 | goto failed; |
6339 | 0 | } |
6340 | 20.8k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 20.8k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6341 | 20.8k | targets = _Py_asdl_expr_seq_new(len, arena); |
6342 | 20.8k | if (targets == NULL) goto failed; Branch (6342:17): [True: 0, False: 20.8k]
|
6343 | 41.9k | for (i = 0; i < len; i++) { Branch (6343:25): [True: 21.0k, False: 20.8k]
|
6344 | 21.0k | expr_ty val; |
6345 | 21.0k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 21.0k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 21.0k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 21.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6346 | 21.0k | Py_INCREF(tmp2); Line | Count | Source | 512 | 21.0k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 21.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 21.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6347 | 21.0k | if (_Py_EnterRecursiveCall(" while traversing 'Assign' node")) { Branch (6347:21): [True: 0, False: 21.0k]
|
6348 | 0 | goto failed; |
6349 | 0 | } |
6350 | 21.0k | res = obj2ast_expr(state, tmp2, &val, arena); |
6351 | 21.0k | _Py_LeaveRecursiveCall(); |
6352 | 21.0k | Py_DECREF(tmp2); Line | Count | Source | 548 | 21.0k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 21.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 21.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6353 | 21.0k | if (res != 0) goto failed; Branch (6353:21): [True: 0, False: 21.0k]
|
6354 | 21.0k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 21.0k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 21.0k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 21.0k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6354:21): [True: 0, False: 21.0k]
|
6355 | 0 | PyErr_SetString(PyExc_RuntimeError, "Assign field \"targets\" changed size during iteration"); |
6356 | 0 | goto failed; |
6357 | 0 | } |
6358 | 21.0k | asdl_seq_SET(targets, i, val); Line | Count | Source | 94 | 21.0k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 21.0k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6359 | 21.0k | } |
6360 | 20.8k | Py_CLEAR(tmp); Line | Count | Source | 587 | 20.8k | do { \ | 588 | 20.8k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 20.8k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 20.8k, False: 0]
| 590 | 20.8k | (op) = NULL; \ | 591 | 20.8k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 20.8k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 20.8k | } \ | 593 | 20.8k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6361 | 20.8k | } |
6362 | 20.8k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (6362:13): [True: 0, False: 20.8k]
|
6363 | 0 | return 1; |
6364 | 0 | } |
6365 | 20.8k | if (tmp == NULL) { Branch (6365:13): [True: 0, False: 20.8k]
|
6366 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Assign"); |
6367 | 0 | return 1; |
6368 | 0 | } |
6369 | 20.8k | else { |
6370 | 20.8k | int res; |
6371 | 20.8k | if (_Py_EnterRecursiveCall(" while traversing 'Assign' node")) { Branch (6371:17): [True: 0, False: 20.8k]
|
6372 | 0 | goto failed; |
6373 | 0 | } |
6374 | 20.8k | res = obj2ast_expr(state, tmp, &value, arena); |
6375 | 20.8k | _Py_LeaveRecursiveCall(); |
6376 | 20.8k | if (res != 0) goto failed; Branch (6376:17): [True: 0, False: 20.8k]
|
6377 | 20.8k | Py_CLEAR(tmp); Line | Count | Source | 587 | 20.8k | do { \ | 588 | 20.8k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 20.8k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 20.8k, False: 0]
| 590 | 20.8k | (op) = NULL; \ | 591 | 20.8k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 20.8k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 20.8k | } \ | 593 | 20.8k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6378 | 20.8k | } |
6379 | 20.8k | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (6379:13): [True: 0, False: 20.8k]
|
6380 | 0 | return 1; |
6381 | 0 | } |
6382 | 20.8k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 20.8k | #define Py_None (&_Py_NoneStruct) |
Branch (6382:13): [True: 0, False: 20.8k]
Branch (6382:28): [True: 20.8k, False: 0]
|
6383 | 20.8k | Py_CLEAR(tmp); Line | Count | Source | 587 | 20.8k | do { \ | 588 | 20.8k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 20.8k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 20.8k, False: 0]
| 590 | 20.8k | (op) = NULL; \ | 591 | 20.8k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 20.8k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 20.8k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 20.8k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 20.8k | } \ | 593 | 20.8k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6384 | 20.8k | type_comment = NULL; |
6385 | 20.8k | } |
6386 | 0 | else { |
6387 | 0 | int res; |
6388 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'Assign' node")) { Branch (6388:17): [True: 0, False: 0]
|
6389 | 0 | goto failed; |
6390 | 0 | } |
6391 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
6392 | 0 | _Py_LeaveRecursiveCall(); |
6393 | 0 | if (res != 0) goto failed; Branch (6393:17): [True: 0, False: 0]
|
6394 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6395 | 0 | } |
6396 | 20.8k | *out = _PyAST_Assign(targets, value, type_comment, lineno, col_offset, |
6397 | 20.8k | end_lineno, end_col_offset, arena); |
6398 | 20.8k | if (*out == NULL) goto failed; Branch (6398:13): [True: 0, False: 20.8k]
|
6399 | 20.8k | return 0; |
6400 | 20.8k | } |
6401 | 33.5k | tp = state->AugAssign_type; |
6402 | 33.5k | isinstance = PyObject_IsInstance(obj, tp); |
6403 | 33.5k | if (isinstance == -1) { Branch (6403:9): [True: 0, False: 33.5k]
|
6404 | 0 | return 1; |
6405 | 0 | } |
6406 | 33.5k | if (isinstance) { Branch (6406:9): [True: 856, False: 32.7k]
|
6407 | 856 | expr_ty target; |
6408 | 856 | operator_ty op; |
6409 | 856 | expr_ty value; |
6410 | | |
6411 | 856 | if (_PyObject_LookupAttr(obj, state->target, &tmp) < 0) { Branch (6411:13): [True: 0, False: 856]
|
6412 | 0 | return 1; |
6413 | 0 | } |
6414 | 856 | if (tmp == NULL) { Branch (6414:13): [True: 0, False: 856]
|
6415 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from AugAssign"); |
6416 | 0 | return 1; |
6417 | 0 | } |
6418 | 856 | else { |
6419 | 856 | int res; |
6420 | 856 | if (_Py_EnterRecursiveCall(" while traversing 'AugAssign' node")) { Branch (6420:17): [True: 0, False: 856]
|
6421 | 0 | goto failed; |
6422 | 0 | } |
6423 | 856 | res = obj2ast_expr(state, tmp, &target, arena); |
6424 | 856 | _Py_LeaveRecursiveCall(); |
6425 | 856 | if (res != 0) goto failed; Branch (6425:17): [True: 0, False: 856]
|
6426 | 856 | Py_CLEAR(tmp); Line | Count | Source | 587 | 856 | do { \ | 588 | 856 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 856 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 856 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 856 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 856, False: 0]
| 590 | 856 | (op) = NULL; \ | 591 | 856 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 856 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 856 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 856 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 856 | } \ | 593 | 856 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6427 | 856 | } |
6428 | 856 | if (_PyObject_LookupAttr(obj, state->op, &tmp) < 0) { Branch (6428:13): [True: 0, False: 856]
|
6429 | 0 | return 1; |
6430 | 0 | } |
6431 | 856 | if (tmp == NULL) { Branch (6431:13): [True: 0, False: 856]
|
6432 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from AugAssign"); |
6433 | 0 | return 1; |
6434 | 0 | } |
6435 | 856 | else { |
6436 | 856 | int res; |
6437 | 856 | if (_Py_EnterRecursiveCall(" while traversing 'AugAssign' node")) { Branch (6437:17): [True: 0, False: 856]
|
6438 | 0 | goto failed; |
6439 | 0 | } |
6440 | 856 | res = obj2ast_operator(state, tmp, &op, arena); |
6441 | 856 | _Py_LeaveRecursiveCall(); |
6442 | 856 | if (res != 0) goto failed; Branch (6442:17): [True: 0, False: 856]
|
6443 | 856 | Py_CLEAR(tmp); Line | Count | Source | 587 | 856 | do { \ | 588 | 856 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 856 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 856 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 856 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 856, False: 0]
| 590 | 856 | (op) = NULL; \ | 591 | 856 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 856 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 856 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 856 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 856 | } \ | 593 | 856 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6444 | 856 | } |
6445 | 856 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (6445:13): [True: 0, False: 856]
|
6446 | 0 | return 1; |
6447 | 0 | } |
6448 | 856 | if (tmp == NULL) { Branch (6448:13): [True: 0, False: 856]
|
6449 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from AugAssign"); |
6450 | 0 | return 1; |
6451 | 0 | } |
6452 | 856 | else { |
6453 | 856 | int res; |
6454 | 856 | if (_Py_EnterRecursiveCall(" while traversing 'AugAssign' node")) { Branch (6454:17): [True: 0, False: 856]
|
6455 | 0 | goto failed; |
6456 | 0 | } |
6457 | 856 | res = obj2ast_expr(state, tmp, &value, arena); |
6458 | 856 | _Py_LeaveRecursiveCall(); |
6459 | 856 | if (res != 0) goto failed; Branch (6459:17): [True: 0, False: 856]
|
6460 | 856 | Py_CLEAR(tmp); Line | Count | Source | 587 | 856 | do { \ | 588 | 856 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 856 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 856 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 856 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 856, False: 0]
| 590 | 856 | (op) = NULL; \ | 591 | 856 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 856 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 856 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 856 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 856 | } \ | 593 | 856 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6461 | 856 | } |
6462 | 856 | *out = _PyAST_AugAssign(target, op, value, lineno, col_offset, |
6463 | 856 | end_lineno, end_col_offset, arena); |
6464 | 856 | if (*out == NULL) goto failed; Branch (6464:13): [True: 0, False: 856]
|
6465 | 856 | return 0; |
6466 | 856 | } |
6467 | 32.7k | tp = state->AnnAssign_type; |
6468 | 32.7k | isinstance = PyObject_IsInstance(obj, tp); |
6469 | 32.7k | if (isinstance == -1) { Branch (6469:9): [True: 0, False: 32.7k]
|
6470 | 0 | return 1; |
6471 | 0 | } |
6472 | 32.7k | if (isinstance) { Branch (6472:9): [True: 37, False: 32.6k]
|
6473 | 37 | expr_ty target; |
6474 | 37 | expr_ty annotation; |
6475 | 37 | expr_ty value; |
6476 | 37 | int simple; |
6477 | | |
6478 | 37 | if (_PyObject_LookupAttr(obj, state->target, &tmp) < 0) { Branch (6478:13): [True: 0, False: 37]
|
6479 | 0 | return 1; |
6480 | 0 | } |
6481 | 37 | if (tmp == NULL) { Branch (6481:13): [True: 0, False: 37]
|
6482 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from AnnAssign"); |
6483 | 0 | return 1; |
6484 | 0 | } |
6485 | 37 | else { |
6486 | 37 | int res; |
6487 | 37 | if (_Py_EnterRecursiveCall(" while traversing 'AnnAssign' node")) { Branch (6487:17): [True: 0, False: 37]
|
6488 | 0 | goto failed; |
6489 | 0 | } |
6490 | 37 | res = obj2ast_expr(state, tmp, &target, arena); |
6491 | 37 | _Py_LeaveRecursiveCall(); |
6492 | 37 | if (res != 0) goto failed; Branch (6492:17): [True: 0, False: 37]
|
6493 | 37 | Py_CLEAR(tmp); Line | Count | Source | 587 | 37 | do { \ | 588 | 37 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 37 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 37, False: 0]
| 590 | 37 | (op) = NULL; \ | 591 | 37 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 37 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 37 | } \ | 593 | 37 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6494 | 37 | } |
6495 | 37 | if (_PyObject_LookupAttr(obj, state->annotation, &tmp) < 0) { Branch (6495:13): [True: 0, False: 37]
|
6496 | 0 | return 1; |
6497 | 0 | } |
6498 | 37 | if (tmp == NULL) { Branch (6498:13): [True: 0, False: 37]
|
6499 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"annotation\" missing from AnnAssign"); |
6500 | 0 | return 1; |
6501 | 0 | } |
6502 | 37 | else { |
6503 | 37 | int res; |
6504 | 37 | if (_Py_EnterRecursiveCall(" while traversing 'AnnAssign' node")) { Branch (6504:17): [True: 0, False: 37]
|
6505 | 0 | goto failed; |
6506 | 0 | } |
6507 | 37 | res = obj2ast_expr(state, tmp, &annotation, arena); |
6508 | 37 | _Py_LeaveRecursiveCall(); |
6509 | 37 | if (res != 0) goto failed; Branch (6509:17): [True: 0, False: 37]
|
6510 | 37 | Py_CLEAR(tmp); Line | Count | Source | 587 | 37 | do { \ | 588 | 37 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 37 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 37, False: 0]
| 590 | 37 | (op) = NULL; \ | 591 | 37 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 37 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 37 | } \ | 593 | 37 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6511 | 37 | } |
6512 | 37 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (6512:13): [True: 0, False: 37]
|
6513 | 0 | return 1; |
6514 | 0 | } |
6515 | 37 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 37 | #define Py_None (&_Py_NoneStruct) |
Branch (6515:13): [True: 0, False: 37]
Branch (6515:28): [True: 26, False: 11]
|
6516 | 26 | Py_CLEAR(tmp); Line | Count | Source | 587 | 26 | do { \ | 588 | 26 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 26 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 26 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 26 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 26, False: 0]
| 590 | 26 | (op) = NULL; \ | 591 | 26 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 26 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 26 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 26 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 26 | } \ | 593 | 26 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6517 | 26 | value = NULL; |
6518 | 26 | } |
6519 | 11 | else { |
6520 | 11 | int res; |
6521 | 11 | if (_Py_EnterRecursiveCall(" while traversing 'AnnAssign' node")) { Branch (6521:17): [True: 0, False: 11]
|
6522 | 0 | goto failed; |
6523 | 0 | } |
6524 | 11 | res = obj2ast_expr(state, tmp, &value, arena); |
6525 | 11 | _Py_LeaveRecursiveCall(); |
6526 | 11 | if (res != 0) goto failed; Branch (6526:17): [True: 0, False: 11]
|
6527 | 11 | Py_CLEAR(tmp); Line | Count | Source | 587 | 11 | do { \ | 588 | 11 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 11 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 11, False: 0]
| 590 | 11 | (op) = NULL; \ | 591 | 11 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 11 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 11 | } \ | 593 | 11 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6528 | 11 | } |
6529 | 37 | if (_PyObject_LookupAttr(obj, state->simple, &tmp) < 0) { Branch (6529:13): [True: 0, False: 37]
|
6530 | 0 | return 1; |
6531 | 0 | } |
6532 | 37 | if (tmp == NULL) { Branch (6532:13): [True: 0, False: 37]
|
6533 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"simple\" missing from AnnAssign"); |
6534 | 0 | return 1; |
6535 | 0 | } |
6536 | 37 | else { |
6537 | 37 | int res; |
6538 | 37 | if (_Py_EnterRecursiveCall(" while traversing 'AnnAssign' node")) { Branch (6538:17): [True: 0, False: 37]
|
6539 | 0 | goto failed; |
6540 | 0 | } |
6541 | 37 | res = obj2ast_int(state, tmp, &simple, arena); |
6542 | 37 | _Py_LeaveRecursiveCall(); |
6543 | 37 | if (res != 0) goto failed; Branch (6543:17): [True: 0, False: 37]
|
6544 | 37 | Py_CLEAR(tmp); Line | Count | Source | 587 | 37 | do { \ | 588 | 37 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 37 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 37, False: 0]
| 590 | 37 | (op) = NULL; \ | 591 | 37 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 37 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 37 | } \ | 593 | 37 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6545 | 37 | } |
6546 | 37 | *out = _PyAST_AnnAssign(target, annotation, value, simple, lineno, |
6547 | 37 | col_offset, end_lineno, end_col_offset, arena); |
6548 | 37 | if (*out == NULL) goto failed; Branch (6548:13): [True: 0, False: 37]
|
6549 | 37 | return 0; |
6550 | 37 | } |
6551 | 32.6k | tp = state->For_type; |
6552 | 32.6k | isinstance = PyObject_IsInstance(obj, tp); |
6553 | 32.6k | if (isinstance == -1) { Branch (6553:9): [True: 0, False: 32.6k]
|
6554 | 0 | return 1; |
6555 | 0 | } |
6556 | 32.6k | if (isinstance) { Branch (6556:9): [True: 1.39k, False: 31.2k]
|
6557 | 1.39k | expr_ty target; |
6558 | 1.39k | expr_ty iter; |
6559 | 1.39k | asdl_stmt_seq* body; |
6560 | 1.39k | asdl_stmt_seq* orelse; |
6561 | 1.39k | string type_comment; |
6562 | | |
6563 | 1.39k | if (_PyObject_LookupAttr(obj, state->target, &tmp) < 0) { Branch (6563:13): [True: 0, False: 1.39k]
|
6564 | 0 | return 1; |
6565 | 0 | } |
6566 | 1.39k | if (tmp == NULL) { Branch (6566:13): [True: 0, False: 1.39k]
|
6567 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from For"); |
6568 | 0 | return 1; |
6569 | 0 | } |
6570 | 1.39k | else { |
6571 | 1.39k | int res; |
6572 | 1.39k | if (_Py_EnterRecursiveCall(" while traversing 'For' node")) { Branch (6572:17): [True: 0, False: 1.39k]
|
6573 | 0 | goto failed; |
6574 | 0 | } |
6575 | 1.39k | res = obj2ast_expr(state, tmp, &target, arena); |
6576 | 1.39k | _Py_LeaveRecursiveCall(); |
6577 | 1.39k | if (res != 0) goto failed; Branch (6577:17): [True: 0, False: 1.39k]
|
6578 | 1.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.39k | do { \ | 588 | 1.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.39k, False: 0]
| 590 | 1.39k | (op) = NULL; \ | 591 | 1.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.39k | } \ | 593 | 1.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6579 | 1.39k | } |
6580 | 1.39k | if (_PyObject_LookupAttr(obj, state->iter, &tmp) < 0) { Branch (6580:13): [True: 0, False: 1.39k]
|
6581 | 0 | return 1; |
6582 | 0 | } |
6583 | 1.39k | if (tmp == NULL) { Branch (6583:13): [True: 0, False: 1.39k]
|
6584 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from For"); |
6585 | 0 | return 1; |
6586 | 0 | } |
6587 | 1.39k | else { |
6588 | 1.39k | int res; |
6589 | 1.39k | if (_Py_EnterRecursiveCall(" while traversing 'For' node")) { Branch (6589:17): [True: 0, False: 1.39k]
|
6590 | 0 | goto failed; |
6591 | 0 | } |
6592 | 1.39k | res = obj2ast_expr(state, tmp, &iter, arena); |
6593 | 1.39k | _Py_LeaveRecursiveCall(); |
6594 | 1.39k | if (res != 0) goto failed; Branch (6594:17): [True: 0, False: 1.39k]
|
6595 | 1.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.39k | do { \ | 588 | 1.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.39k, False: 0]
| 590 | 1.39k | (op) = NULL; \ | 591 | 1.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.39k | } \ | 593 | 1.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6596 | 1.39k | } |
6597 | 1.39k | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (6597:13): [True: 0, False: 1.39k]
|
6598 | 0 | return 1; |
6599 | 0 | } |
6600 | 1.39k | if (tmp == NULL) { Branch (6600:13): [True: 0, False: 1.39k]
|
6601 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from For"); |
6602 | 0 | return 1; |
6603 | 0 | } |
6604 | 1.39k | else { |
6605 | 1.39k | int res; |
6606 | 1.39k | Py_ssize_t len; |
6607 | 1.39k | Py_ssize_t i; |
6608 | 1.39k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.39k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.39k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6608:17): [True: 0, False: 1.39k]
|
6609 | 0 | PyErr_Format(PyExc_TypeError, "For field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6610 | 0 | goto failed; |
6611 | 0 | } |
6612 | 1.39k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.39k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6613 | 1.39k | body = _Py_asdl_stmt_seq_new(len, arena); |
6614 | 1.39k | if (body == NULL) goto failed; Branch (6614:17): [True: 0, False: 1.39k]
|
6615 | 4.17k | for (i = 0; i < len; i++) { Branch (6615:25): [True: 2.77k, False: 1.39k]
|
6616 | 2.77k | stmt_ty val; |
6617 | 2.77k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 2.77k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 2.77k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 2.77k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6618 | 2.77k | Py_INCREF(tmp2); Line | Count | Source | 512 | 2.77k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.77k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.77k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6619 | 2.77k | if (_Py_EnterRecursiveCall(" while traversing 'For' node")) { Branch (6619:21): [True: 0, False: 2.77k]
|
6620 | 0 | goto failed; |
6621 | 0 | } |
6622 | 2.77k | res = obj2ast_stmt(state, tmp2, &val, arena); |
6623 | 2.77k | _Py_LeaveRecursiveCall(); |
6624 | 2.77k | Py_DECREF(tmp2); Line | Count | Source | 548 | 2.77k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.77k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.77k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6625 | 2.77k | if (res != 0) goto failed; Branch (6625:21): [True: 0, False: 2.77k]
|
6626 | 2.77k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 2.77k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.77k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.77k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6626:21): [True: 0, False: 2.77k]
|
6627 | 0 | PyErr_SetString(PyExc_RuntimeError, "For field \"body\" changed size during iteration"); |
6628 | 0 | goto failed; |
6629 | 0 | } |
6630 | 2.77k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 2.77k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 2.77k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6631 | 2.77k | } |
6632 | 1.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.39k | do { \ | 588 | 1.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.39k, False: 0]
| 590 | 1.39k | (op) = NULL; \ | 591 | 1.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.39k | } \ | 593 | 1.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6633 | 1.39k | } |
6634 | 1.39k | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (6634:13): [True: 0, False: 1.39k]
|
6635 | 0 | return 1; |
6636 | 0 | } |
6637 | 1.39k | if (tmp == NULL) { Branch (6637:13): [True: 0, False: 1.39k]
|
6638 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from For"); |
6639 | 0 | return 1; |
6640 | 0 | } |
6641 | 1.39k | else { |
6642 | 1.39k | int res; |
6643 | 1.39k | Py_ssize_t len; |
6644 | 1.39k | Py_ssize_t i; |
6645 | 1.39k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.39k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.39k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6645:17): [True: 0, False: 1.39k]
|
6646 | 0 | PyErr_Format(PyExc_TypeError, "For field \"orelse\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6647 | 0 | goto failed; |
6648 | 0 | } |
6649 | 1.39k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.39k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6650 | 1.39k | orelse = _Py_asdl_stmt_seq_new(len, arena); |
6651 | 1.39k | if (orelse == NULL) goto failed; Branch (6651:17): [True: 0, False: 1.39k]
|
6652 | 1.45k | for (i = 0; i < len; i++) { Branch (6652:25): [True: 52, False: 1.39k]
|
6653 | 52 | stmt_ty val; |
6654 | 52 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 52 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 52 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 52 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6655 | 52 | Py_INCREF(tmp2); Line | Count | Source | 512 | 52 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 52 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 52 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6656 | 52 | if (_Py_EnterRecursiveCall(" while traversing 'For' node")) { Branch (6656:21): [True: 0, False: 52]
|
6657 | 0 | goto failed; |
6658 | 0 | } |
6659 | 52 | res = obj2ast_stmt(state, tmp2, &val, arena); |
6660 | 52 | _Py_LeaveRecursiveCall(); |
6661 | 52 | Py_DECREF(tmp2); Line | Count | Source | 548 | 52 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 52 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 52 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6662 | 52 | if (res != 0) goto failed; Branch (6662:21): [True: 0, False: 52]
|
6663 | 52 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 52 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 52 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 52 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6663:21): [True: 0, False: 52]
|
6664 | 0 | PyErr_SetString(PyExc_RuntimeError, "For field \"orelse\" changed size during iteration"); |
6665 | 0 | goto failed; |
6666 | 0 | } |
6667 | 52 | asdl_seq_SET(orelse, i, val); Line | Count | Source | 94 | 52 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 52 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6668 | 52 | } |
6669 | 1.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.39k | do { \ | 588 | 1.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.39k, False: 0]
| 590 | 1.39k | (op) = NULL; \ | 591 | 1.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.39k | } \ | 593 | 1.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6670 | 1.39k | } |
6671 | 1.39k | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (6671:13): [True: 0, False: 1.39k]
|
6672 | 0 | return 1; |
6673 | 0 | } |
6674 | 1.39k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.39k | #define Py_None (&_Py_NoneStruct) |
Branch (6674:13): [True: 0, False: 1.39k]
Branch (6674:28): [True: 1.39k, False: 0]
|
6675 | 1.39k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.39k | do { \ | 588 | 1.39k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.39k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.39k, False: 0]
| 590 | 1.39k | (op) = NULL; \ | 591 | 1.39k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.39k | } \ | 593 | 1.39k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6676 | 1.39k | type_comment = NULL; |
6677 | 1.39k | } |
6678 | 0 | else { |
6679 | 0 | int res; |
6680 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'For' node")) { Branch (6680:17): [True: 0, False: 0]
|
6681 | 0 | goto failed; |
6682 | 0 | } |
6683 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
6684 | 0 | _Py_LeaveRecursiveCall(); |
6685 | 0 | if (res != 0) goto failed; Branch (6685:17): [True: 0, False: 0]
|
6686 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6687 | 0 | } |
6688 | 1.39k | *out = _PyAST_For(target, iter, body, orelse, type_comment, lineno, |
6689 | 1.39k | col_offset, end_lineno, end_col_offset, arena); |
6690 | 1.39k | if (*out == NULL) goto failed; Branch (6690:13): [True: 0, False: 1.39k]
|
6691 | 1.39k | return 0; |
6692 | 1.39k | } |
6693 | 31.2k | tp = state->AsyncFor_type; |
6694 | 31.2k | isinstance = PyObject_IsInstance(obj, tp); |
6695 | 31.2k | if (isinstance == -1) { Branch (6695:9): [True: 0, False: 31.2k]
|
6696 | 0 | return 1; |
6697 | 0 | } |
6698 | 31.2k | if (isinstance) { Branch (6698:9): [True: 6, False: 31.2k]
|
6699 | 6 | expr_ty target; |
6700 | 6 | expr_ty iter; |
6701 | 6 | asdl_stmt_seq* body; |
6702 | 6 | asdl_stmt_seq* orelse; |
6703 | 6 | string type_comment; |
6704 | | |
6705 | 6 | if (_PyObject_LookupAttr(obj, state->target, &tmp) < 0) { Branch (6705:13): [True: 0, False: 6]
|
6706 | 0 | return 1; |
6707 | 0 | } |
6708 | 6 | if (tmp == NULL) { Branch (6708:13): [True: 0, False: 6]
|
6709 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from AsyncFor"); |
6710 | 0 | return 1; |
6711 | 0 | } |
6712 | 6 | else { |
6713 | 6 | int res; |
6714 | 6 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFor' node")) { Branch (6714:17): [True: 0, False: 6]
|
6715 | 0 | goto failed; |
6716 | 0 | } |
6717 | 6 | res = obj2ast_expr(state, tmp, &target, arena); |
6718 | 6 | _Py_LeaveRecursiveCall(); |
6719 | 6 | if (res != 0) goto failed; Branch (6719:17): [True: 0, False: 6]
|
6720 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6721 | 6 | } |
6722 | 6 | if (_PyObject_LookupAttr(obj, state->iter, &tmp) < 0) { Branch (6722:13): [True: 0, False: 6]
|
6723 | 0 | return 1; |
6724 | 0 | } |
6725 | 6 | if (tmp == NULL) { Branch (6725:13): [True: 0, False: 6]
|
6726 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from AsyncFor"); |
6727 | 0 | return 1; |
6728 | 0 | } |
6729 | 6 | else { |
6730 | 6 | int res; |
6731 | 6 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFor' node")) { Branch (6731:17): [True: 0, False: 6]
|
6732 | 0 | goto failed; |
6733 | 0 | } |
6734 | 6 | res = obj2ast_expr(state, tmp, &iter, arena); |
6735 | 6 | _Py_LeaveRecursiveCall(); |
6736 | 6 | if (res != 0) goto failed; Branch (6736:17): [True: 0, False: 6]
|
6737 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6738 | 6 | } |
6739 | 6 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (6739:13): [True: 0, False: 6]
|
6740 | 0 | return 1; |
6741 | 0 | } |
6742 | 6 | if (tmp == NULL) { Branch (6742:13): [True: 0, False: 6]
|
6743 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncFor"); |
6744 | 0 | return 1; |
6745 | 0 | } |
6746 | 6 | else { |
6747 | 6 | int res; |
6748 | 6 | Py_ssize_t len; |
6749 | 6 | Py_ssize_t i; |
6750 | 6 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 6 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 6 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6750:17): [True: 0, False: 6]
|
6751 | 0 | PyErr_Format(PyExc_TypeError, "AsyncFor field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6752 | 0 | goto failed; |
6753 | 0 | } |
6754 | 6 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 6 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6755 | 6 | body = _Py_asdl_stmt_seq_new(len, arena); |
6756 | 6 | if (body == NULL) goto failed; Branch (6756:17): [True: 0, False: 6]
|
6757 | 12 | for (i = 0; i < len; i++) { Branch (6757:25): [True: 6, False: 6]
|
6758 | 6 | stmt_ty val; |
6759 | 6 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 6 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 6 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6760 | 6 | Py_INCREF(tmp2); Line | Count | Source | 512 | 6 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6761 | 6 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFor' node")) { Branch (6761:21): [True: 0, False: 6]
|
6762 | 0 | goto failed; |
6763 | 0 | } |
6764 | 6 | res = obj2ast_stmt(state, tmp2, &val, arena); |
6765 | 6 | _Py_LeaveRecursiveCall(); |
6766 | 6 | Py_DECREF(tmp2); Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6767 | 6 | if (res != 0) goto failed; Branch (6767:21): [True: 0, False: 6]
|
6768 | 6 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 6 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6768:21): [True: 0, False: 6]
|
6769 | 0 | PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"body\" changed size during iteration"); |
6770 | 0 | goto failed; |
6771 | 0 | } |
6772 | 6 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 6 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 6 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6773 | 6 | } |
6774 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6775 | 6 | } |
6776 | 6 | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (6776:13): [True: 0, False: 6]
|
6777 | 0 | return 1; |
6778 | 0 | } |
6779 | 6 | if (tmp == NULL) { Branch (6779:13): [True: 0, False: 6]
|
6780 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from AsyncFor"); |
6781 | 0 | return 1; |
6782 | 0 | } |
6783 | 6 | else { |
6784 | 6 | int res; |
6785 | 6 | Py_ssize_t len; |
6786 | 6 | Py_ssize_t i; |
6787 | 6 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 6 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 6 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6787:17): [True: 0, False: 6]
|
6788 | 0 | PyErr_Format(PyExc_TypeError, "AsyncFor field \"orelse\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6789 | 0 | goto failed; |
6790 | 0 | } |
6791 | 6 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 6 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6792 | 6 | orelse = _Py_asdl_stmt_seq_new(len, arena); |
6793 | 6 | if (orelse == NULL) goto failed; Branch (6793:17): [True: 0, False: 6]
|
6794 | 9 | for (i = 0; i < len; i++) { Branch (6794:25): [True: 3, False: 6]
|
6795 | 3 | stmt_ty val; |
6796 | 3 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 3 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 3 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6797 | 3 | Py_INCREF(tmp2); Line | Count | Source | 512 | 3 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6798 | 3 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFor' node")) { Branch (6798:21): [True: 0, False: 3]
|
6799 | 0 | goto failed; |
6800 | 0 | } |
6801 | 3 | res = obj2ast_stmt(state, tmp2, &val, arena); |
6802 | 3 | _Py_LeaveRecursiveCall(); |
6803 | 3 | Py_DECREF(tmp2); Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6804 | 3 | if (res != 0) goto failed; Branch (6804:21): [True: 0, False: 3]
|
6805 | 3 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 3 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6805:21): [True: 0, False: 3]
|
6806 | 0 | PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"orelse\" changed size during iteration"); |
6807 | 0 | goto failed; |
6808 | 0 | } |
6809 | 3 | asdl_seq_SET(orelse, i, val); Line | Count | Source | 94 | 3 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 3 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6810 | 3 | } |
6811 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6812 | 6 | } |
6813 | 6 | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (6813:13): [True: 0, False: 6]
|
6814 | 0 | return 1; |
6815 | 0 | } |
6816 | 6 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 6 | #define Py_None (&_Py_NoneStruct) |
Branch (6816:13): [True: 0, False: 6]
Branch (6816:28): [True: 6, False: 0]
|
6817 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6818 | 6 | type_comment = NULL; |
6819 | 6 | } |
6820 | 0 | else { |
6821 | 0 | int res; |
6822 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncFor' node")) { Branch (6822:17): [True: 0, False: 0]
|
6823 | 0 | goto failed; |
6824 | 0 | } |
6825 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
6826 | 0 | _Py_LeaveRecursiveCall(); |
6827 | 0 | if (res != 0) goto failed; Branch (6827:17): [True: 0, False: 0]
|
6828 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6829 | 0 | } |
6830 | 6 | *out = _PyAST_AsyncFor(target, iter, body, orelse, type_comment, |
6831 | 6 | lineno, col_offset, end_lineno, end_col_offset, |
6832 | 6 | arena); |
6833 | 6 | if (*out == NULL) goto failed; Branch (6833:13): [True: 0, False: 6]
|
6834 | 6 | return 0; |
6835 | 6 | } |
6836 | 31.2k | tp = state->While_type; |
6837 | 31.2k | isinstance = PyObject_IsInstance(obj, tp); |
6838 | 31.2k | if (isinstance == -1) { Branch (6838:9): [True: 0, False: 31.2k]
|
6839 | 0 | return 1; |
6840 | 0 | } |
6841 | 31.2k | if (isinstance) { Branch (6841:9): [True: 443, False: 30.8k]
|
6842 | 443 | expr_ty test; |
6843 | 443 | asdl_stmt_seq* body; |
6844 | 443 | asdl_stmt_seq* orelse; |
6845 | | |
6846 | 443 | if (_PyObject_LookupAttr(obj, state->test, &tmp) < 0) { Branch (6846:13): [True: 0, False: 443]
|
6847 | 0 | return 1; |
6848 | 0 | } |
6849 | 443 | if (tmp == NULL) { Branch (6849:13): [True: 0, False: 443]
|
6850 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from While"); |
6851 | 0 | return 1; |
6852 | 0 | } |
6853 | 443 | else { |
6854 | 443 | int res; |
6855 | 443 | if (_Py_EnterRecursiveCall(" while traversing 'While' node")) { Branch (6855:17): [True: 0, False: 443]
|
6856 | 0 | goto failed; |
6857 | 0 | } |
6858 | 443 | res = obj2ast_expr(state, tmp, &test, arena); |
6859 | 443 | _Py_LeaveRecursiveCall(); |
6860 | 443 | if (res != 0) goto failed; Branch (6860:17): [True: 0, False: 443]
|
6861 | 443 | Py_CLEAR(tmp); Line | Count | Source | 587 | 443 | do { \ | 588 | 443 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 443 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 443, False: 0]
| 590 | 443 | (op) = NULL; \ | 591 | 443 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 443 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 443 | } \ | 593 | 443 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6862 | 443 | } |
6863 | 443 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (6863:13): [True: 0, False: 443]
|
6864 | 0 | return 1; |
6865 | 0 | } |
6866 | 443 | if (tmp == NULL) { Branch (6866:13): [True: 0, False: 443]
|
6867 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from While"); |
6868 | 0 | return 1; |
6869 | 0 | } |
6870 | 443 | else { |
6871 | 443 | int res; |
6872 | 443 | Py_ssize_t len; |
6873 | 443 | Py_ssize_t i; |
6874 | 443 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 443 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 443 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6874:17): [True: 0, False: 443]
|
6875 | 0 | PyErr_Format(PyExc_TypeError, "While field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6876 | 0 | goto failed; |
6877 | 0 | } |
6878 | 443 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 443 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6879 | 443 | body = _Py_asdl_stmt_seq_new(len, arena); |
6880 | 443 | if (body == NULL) goto failed; Branch (6880:17): [True: 0, False: 443]
|
6881 | 1.84k | for (i = 0; i < len; i++) { Branch (6881:25): [True: 1.40k, False: 443]
|
6882 | 1.40k | stmt_ty val; |
6883 | 1.40k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 1.40k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 1.40k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 1.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6884 | 1.40k | Py_INCREF(tmp2); Line | Count | Source | 512 | 1.40k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6885 | 1.40k | if (_Py_EnterRecursiveCall(" while traversing 'While' node")) { Branch (6885:21): [True: 0, False: 1.40k]
|
6886 | 0 | goto failed; |
6887 | 0 | } |
6888 | 1.40k | res = obj2ast_stmt(state, tmp2, &val, arena); |
6889 | 1.40k | _Py_LeaveRecursiveCall(); |
6890 | 1.40k | Py_DECREF(tmp2); Line | Count | Source | 548 | 1.40k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6891 | 1.40k | if (res != 0) goto failed; Branch (6891:21): [True: 0, False: 1.40k]
|
6892 | 1.40k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 1.40k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.40k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.40k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6892:21): [True: 0, False: 1.40k]
|
6893 | 0 | PyErr_SetString(PyExc_RuntimeError, "While field \"body\" changed size during iteration"); |
6894 | 0 | goto failed; |
6895 | 0 | } |
6896 | 1.40k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 1.40k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 1.40k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6897 | 1.40k | } |
6898 | 443 | Py_CLEAR(tmp); Line | Count | Source | 587 | 443 | do { \ | 588 | 443 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 443 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 443, False: 0]
| 590 | 443 | (op) = NULL; \ | 591 | 443 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 443 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 443 | } \ | 593 | 443 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6899 | 443 | } |
6900 | 443 | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (6900:13): [True: 0, False: 443]
|
6901 | 0 | return 1; |
6902 | 0 | } |
6903 | 443 | if (tmp == NULL) { Branch (6903:13): [True: 0, False: 443]
|
6904 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from While"); |
6905 | 0 | return 1; |
6906 | 0 | } |
6907 | 443 | else { |
6908 | 443 | int res; |
6909 | 443 | Py_ssize_t len; |
6910 | 443 | Py_ssize_t i; |
6911 | 443 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 443 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 443 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6911:17): [True: 0, False: 443]
|
6912 | 0 | PyErr_Format(PyExc_TypeError, "While field \"orelse\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6913 | 0 | goto failed; |
6914 | 0 | } |
6915 | 443 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 443 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6916 | 443 | orelse = _Py_asdl_stmt_seq_new(len, arena); |
6917 | 443 | if (orelse == NULL) goto failed; Branch (6917:17): [True: 0, False: 443]
|
6918 | 454 | for (i = 0; i < len; i++) { Branch (6918:25): [True: 11, False: 443]
|
6919 | 11 | stmt_ty val; |
6920 | 11 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 11 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 11 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6921 | 11 | Py_INCREF(tmp2); Line | Count | Source | 512 | 11 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6922 | 11 | if (_Py_EnterRecursiveCall(" while traversing 'While' node")) { Branch (6922:21): [True: 0, False: 11]
|
6923 | 0 | goto failed; |
6924 | 0 | } |
6925 | 11 | res = obj2ast_stmt(state, tmp2, &val, arena); |
6926 | 11 | _Py_LeaveRecursiveCall(); |
6927 | 11 | Py_DECREF(tmp2); Line | Count | Source | 548 | 11 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6928 | 11 | if (res != 0) goto failed; Branch (6928:21): [True: 0, False: 11]
|
6929 | 11 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 11 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6929:21): [True: 0, False: 11]
|
6930 | 0 | PyErr_SetString(PyExc_RuntimeError, "While field \"orelse\" changed size during iteration"); |
6931 | 0 | goto failed; |
6932 | 0 | } |
6933 | 11 | asdl_seq_SET(orelse, i, val); Line | Count | Source | 94 | 11 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 11 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
6934 | 11 | } |
6935 | 443 | Py_CLEAR(tmp); Line | Count | Source | 587 | 443 | do { \ | 588 | 443 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 443 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 443, False: 0]
| 590 | 443 | (op) = NULL; \ | 591 | 443 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 443 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 443 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 443 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 443 | } \ | 593 | 443 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6936 | 443 | } |
6937 | 443 | *out = _PyAST_While(test, body, orelse, lineno, col_offset, end_lineno, |
6938 | 443 | end_col_offset, arena); |
6939 | 443 | if (*out == NULL) goto failed; Branch (6939:13): [True: 0, False: 443]
|
6940 | 443 | return 0; |
6941 | 443 | } |
6942 | 30.8k | tp = state->If_type; |
6943 | 30.8k | isinstance = PyObject_IsInstance(obj, tp); |
6944 | 30.8k | if (isinstance == -1) { Branch (6944:9): [True: 0, False: 30.8k]
|
6945 | 0 | return 1; |
6946 | 0 | } |
6947 | 30.8k | if (isinstance) { Branch (6947:9): [True: 11.1k, False: 19.6k]
|
6948 | 11.1k | expr_ty test; |
6949 | 11.1k | asdl_stmt_seq* body; |
6950 | 11.1k | asdl_stmt_seq* orelse; |
6951 | | |
6952 | 11.1k | if (_PyObject_LookupAttr(obj, state->test, &tmp) < 0) { Branch (6952:13): [True: 0, False: 11.1k]
|
6953 | 0 | return 1; |
6954 | 0 | } |
6955 | 11.1k | if (tmp == NULL) { Branch (6955:13): [True: 0, False: 11.1k]
|
6956 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from If"); |
6957 | 0 | return 1; |
6958 | 0 | } |
6959 | 11.1k | else { |
6960 | 11.1k | int res; |
6961 | 11.1k | if (_Py_EnterRecursiveCall(" while traversing 'If' node")) { Branch (6961:17): [True: 0, False: 11.1k]
|
6962 | 0 | goto failed; |
6963 | 0 | } |
6964 | 11.1k | res = obj2ast_expr(state, tmp, &test, arena); |
6965 | 11.1k | _Py_LeaveRecursiveCall(); |
6966 | 11.1k | if (res != 0) goto failed; Branch (6966:17): [True: 0, False: 11.1k]
|
6967 | 11.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 11.1k | do { \ | 588 | 11.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 11.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 11.1k, False: 0]
| 590 | 11.1k | (op) = NULL; \ | 591 | 11.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 11.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 11.1k | } \ | 593 | 11.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
6968 | 11.1k | } |
6969 | 11.1k | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (6969:13): [True: 0, False: 11.1k]
|
6970 | 0 | return 1; |
6971 | 0 | } |
6972 | 11.1k | if (tmp == NULL) { Branch (6972:13): [True: 0, False: 11.1k]
|
6973 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from If"); |
6974 | 0 | return 1; |
6975 | 0 | } |
6976 | 11.1k | else { |
6977 | 11.1k | int res; |
6978 | 11.1k | Py_ssize_t len; |
6979 | 11.1k | Py_ssize_t i; |
6980 | 11.1k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 11.1k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 11.1k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (6980:17): [True: 0, False: 11.1k]
|
6981 | 0 | PyErr_Format(PyExc_TypeError, "If field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6982 | 0 | goto failed; |
6983 | 0 | } |
6984 | 11.1k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 11.1k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6985 | 11.1k | body = _Py_asdl_stmt_seq_new(len, arena); |
6986 | 11.1k | if (body == NULL) goto failed; Branch (6986:17): [True: 0, False: 11.1k]
|
6987 | 27.4k | for (i = 0; i < len; i++) { Branch (6987:25): [True: 16.2k, False: 11.1k]
|
6988 | 16.2k | stmt_ty val; |
6989 | 16.2k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 16.2k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 16.2k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 16.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6990 | 16.2k | Py_INCREF(tmp2); Line | Count | Source | 512 | 16.2k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 16.2k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 16.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6991 | 16.2k | if (_Py_EnterRecursiveCall(" while traversing 'If' node")) { Branch (6991:21): [True: 0, False: 16.2k]
|
6992 | 0 | goto failed; |
6993 | 0 | } |
6994 | 16.2k | res = obj2ast_stmt(state, tmp2, &val, arena); |
6995 | 16.2k | _Py_LeaveRecursiveCall(); |
6996 | 16.2k | Py_DECREF(tmp2); Line | Count | Source | 548 | 16.2k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 16.2k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 16.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
6997 | 16.2k | if (res != 0) goto failed; Branch (6997:21): [True: 0, False: 16.2k]
|
6998 | 16.2k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 16.2k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 16.2k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 16.2k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (6998:21): [True: 0, False: 16.2k]
|
6999 | 0 | PyErr_SetString(PyExc_RuntimeError, "If field \"body\" changed size during iteration"); |
7000 | 0 | goto failed; |
7001 | 0 | } |
7002 | 16.2k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 16.2k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 16.2k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7003 | 16.2k | } |
7004 | 11.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 11.1k | do { \ | 588 | 11.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 11.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 11.1k, False: 0]
| 590 | 11.1k | (op) = NULL; \ | 591 | 11.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 11.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 11.1k | } \ | 593 | 11.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7005 | 11.1k | } |
7006 | 11.1k | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (7006:13): [True: 0, False: 11.1k]
|
7007 | 0 | return 1; |
7008 | 0 | } |
7009 | 11.1k | if (tmp == NULL) { Branch (7009:13): [True: 0, False: 11.1k]
|
7010 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from If"); |
7011 | 0 | return 1; |
7012 | 0 | } |
7013 | 11.1k | else { |
7014 | 11.1k | int res; |
7015 | 11.1k | Py_ssize_t len; |
7016 | 11.1k | Py_ssize_t i; |
7017 | 11.1k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 11.1k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 11.1k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7017:17): [True: 0, False: 11.1k]
|
7018 | 0 | PyErr_Format(PyExc_TypeError, "If field \"orelse\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7019 | 0 | goto failed; |
7020 | 0 | } |
7021 | 11.1k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 11.1k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7022 | 11.1k | orelse = _Py_asdl_stmt_seq_new(len, arena); |
7023 | 11.1k | if (orelse == NULL) goto failed; Branch (7023:17): [True: 0, False: 11.1k]
|
7024 | 15.3k | for (i = 0; i < len; i++) { Branch (7024:25): [True: 4.15k, False: 11.1k]
|
7025 | 4.15k | stmt_ty val; |
7026 | 4.15k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 4.15k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 4.15k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 4.15k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7027 | 4.15k | Py_INCREF(tmp2); Line | Count | Source | 512 | 4.15k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.15k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.15k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7028 | 4.15k | if (_Py_EnterRecursiveCall(" while traversing 'If' node")) { Branch (7028:21): [True: 0, False: 4.15k]
|
7029 | 0 | goto failed; |
7030 | 0 | } |
7031 | 4.15k | res = obj2ast_stmt(state, tmp2, &val, arena); |
7032 | 4.15k | _Py_LeaveRecursiveCall(); |
7033 | 4.15k | Py_DECREF(tmp2); Line | Count | Source | 548 | 4.15k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.15k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.15k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7034 | 4.15k | if (res != 0) goto failed; Branch (7034:21): [True: 0, False: 4.15k]
|
7035 | 4.15k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 4.15k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.15k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.15k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7035:21): [True: 0, False: 4.15k]
|
7036 | 0 | PyErr_SetString(PyExc_RuntimeError, "If field \"orelse\" changed size during iteration"); |
7037 | 0 | goto failed; |
7038 | 0 | } |
7039 | 4.15k | asdl_seq_SET(orelse, i, val); Line | Count | Source | 94 | 4.15k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 4.15k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7040 | 4.15k | } |
7041 | 11.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 11.1k | do { \ | 588 | 11.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 11.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 11.1k, False: 0]
| 590 | 11.1k | (op) = NULL; \ | 591 | 11.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 11.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 11.1k | } \ | 593 | 11.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7042 | 11.1k | } |
7043 | 11.1k | *out = _PyAST_If(test, body, orelse, lineno, col_offset, end_lineno, |
7044 | 11.1k | end_col_offset, arena); |
7045 | 11.1k | if (*out == NULL) goto failed; Branch (7045:13): [True: 0, False: 11.1k]
|
7046 | 11.1k | return 0; |
7047 | 11.1k | } |
7048 | 19.6k | tp = state->With_type; |
7049 | 19.6k | isinstance = PyObject_IsInstance(obj, tp); |
7050 | 19.6k | if (isinstance == -1) { Branch (7050:9): [True: 0, False: 19.6k]
|
7051 | 0 | return 1; |
7052 | 0 | } |
7053 | 19.6k | if (isinstance) { Branch (7053:9): [True: 385, False: 19.3k]
|
7054 | 385 | asdl_withitem_seq* items; |
7055 | 385 | asdl_stmt_seq* body; |
7056 | 385 | string type_comment; |
7057 | | |
7058 | 385 | if (_PyObject_LookupAttr(obj, state->items, &tmp) < 0) { Branch (7058:13): [True: 0, False: 385]
|
7059 | 0 | return 1; |
7060 | 0 | } |
7061 | 385 | if (tmp == NULL) { Branch (7061:13): [True: 0, False: 385]
|
7062 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"items\" missing from With"); |
7063 | 0 | return 1; |
7064 | 0 | } |
7065 | 385 | else { |
7066 | 385 | int res; |
7067 | 385 | Py_ssize_t len; |
7068 | 385 | Py_ssize_t i; |
7069 | 385 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 385 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 385 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7069:17): [True: 0, False: 385]
|
7070 | 0 | PyErr_Format(PyExc_TypeError, "With field \"items\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7071 | 0 | goto failed; |
7072 | 0 | } |
7073 | 385 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 385 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7074 | 385 | items = _Py_asdl_withitem_seq_new(len, arena); |
7075 | 385 | if (items == NULL) goto failed; Branch (7075:17): [True: 0, False: 385]
|
7076 | 791 | for (i = 0; i < len; i++) { Branch (7076:25): [True: 406, False: 385]
|
7077 | 406 | withitem_ty val; |
7078 | 406 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 406 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 406 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 406 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7079 | 406 | Py_INCREF(tmp2); Line | Count | Source | 512 | 406 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 406 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 406 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7080 | 406 | if (_Py_EnterRecursiveCall(" while traversing 'With' node")) { Branch (7080:21): [True: 0, False: 406]
|
7081 | 0 | goto failed; |
7082 | 0 | } |
7083 | 406 | res = obj2ast_withitem(state, tmp2, &val, arena); |
7084 | 406 | _Py_LeaveRecursiveCall(); |
7085 | 406 | Py_DECREF(tmp2); Line | Count | Source | 548 | 406 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 406 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 406 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7086 | 406 | if (res != 0) goto failed; Branch (7086:21): [True: 0, False: 406]
|
7087 | 406 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 406 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 406 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 406 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7087:21): [True: 0, False: 406]
|
7088 | 0 | PyErr_SetString(PyExc_RuntimeError, "With field \"items\" changed size during iteration"); |
7089 | 0 | goto failed; |
7090 | 0 | } |
7091 | 406 | asdl_seq_SET(items, i, val); Line | Count | Source | 94 | 406 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 406 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7092 | 406 | } |
7093 | 385 | Py_CLEAR(tmp); Line | Count | Source | 587 | 385 | do { \ | 588 | 385 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 385 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 385, False: 0]
| 590 | 385 | (op) = NULL; \ | 591 | 385 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 385 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 385 | } \ | 593 | 385 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7094 | 385 | } |
7095 | 385 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (7095:13): [True: 0, False: 385]
|
7096 | 0 | return 1; |
7097 | 0 | } |
7098 | 385 | if (tmp == NULL) { Branch (7098:13): [True: 0, False: 385]
|
7099 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from With"); |
7100 | 0 | return 1; |
7101 | 0 | } |
7102 | 385 | else { |
7103 | 385 | int res; |
7104 | 385 | Py_ssize_t len; |
7105 | 385 | Py_ssize_t i; |
7106 | 385 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 385 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 385 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7106:17): [True: 0, False: 385]
|
7107 | 0 | PyErr_Format(PyExc_TypeError, "With field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7108 | 0 | goto failed; |
7109 | 0 | } |
7110 | 385 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 385 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7111 | 385 | body = _Py_asdl_stmt_seq_new(len, arena); |
7112 | 385 | if (body == NULL) goto failed; Branch (7112:17): [True: 0, False: 385]
|
7113 | 1.07k | for (i = 0; i < len; i++) { Branch (7113:25): [True: 693, False: 385]
|
7114 | 693 | stmt_ty val; |
7115 | 693 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 693 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 693 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 693 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7116 | 693 | Py_INCREF(tmp2); Line | Count | Source | 512 | 693 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 693 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 693 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7117 | 693 | if (_Py_EnterRecursiveCall(" while traversing 'With' node")) { Branch (7117:21): [True: 0, False: 693]
|
7118 | 0 | goto failed; |
7119 | 0 | } |
7120 | 693 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7121 | 693 | _Py_LeaveRecursiveCall(); |
7122 | 693 | Py_DECREF(tmp2); Line | Count | Source | 548 | 693 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 693 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 693 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7123 | 693 | if (res != 0) goto failed; Branch (7123:21): [True: 0, False: 693]
|
7124 | 693 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 693 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 693 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 693 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7124:21): [True: 0, False: 693]
|
7125 | 0 | PyErr_SetString(PyExc_RuntimeError, "With field \"body\" changed size during iteration"); |
7126 | 0 | goto failed; |
7127 | 0 | } |
7128 | 693 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 693 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 693 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7129 | 693 | } |
7130 | 385 | Py_CLEAR(tmp); Line | Count | Source | 587 | 385 | do { \ | 588 | 385 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 385 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 385, False: 0]
| 590 | 385 | (op) = NULL; \ | 591 | 385 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 385 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 385 | } \ | 593 | 385 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7131 | 385 | } |
7132 | 385 | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (7132:13): [True: 0, False: 385]
|
7133 | 0 | return 1; |
7134 | 0 | } |
7135 | 385 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 385 | #define Py_None (&_Py_NoneStruct) |
Branch (7135:13): [True: 0, False: 385]
Branch (7135:28): [True: 385, False: 0]
|
7136 | 385 | Py_CLEAR(tmp); Line | Count | Source | 587 | 385 | do { \ | 588 | 385 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 385 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 385, False: 0]
| 590 | 385 | (op) = NULL; \ | 591 | 385 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 385 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 385 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 385 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 385 | } \ | 593 | 385 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7137 | 385 | type_comment = NULL; |
7138 | 385 | } |
7139 | 0 | else { |
7140 | 0 | int res; |
7141 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'With' node")) { Branch (7141:17): [True: 0, False: 0]
|
7142 | 0 | goto failed; |
7143 | 0 | } |
7144 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
7145 | 0 | _Py_LeaveRecursiveCall(); |
7146 | 0 | if (res != 0) goto failed; Branch (7146:17): [True: 0, False: 0]
|
7147 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7148 | 0 | } |
7149 | 385 | *out = _PyAST_With(items, body, type_comment, lineno, col_offset, |
7150 | 385 | end_lineno, end_col_offset, arena); |
7151 | 385 | if (*out == NULL) goto failed; Branch (7151:13): [True: 0, False: 385]
|
7152 | 385 | return 0; |
7153 | 385 | } |
7154 | 19.3k | tp = state->AsyncWith_type; |
7155 | 19.3k | isinstance = PyObject_IsInstance(obj, tp); |
7156 | 19.3k | if (isinstance == -1) { Branch (7156:9): [True: 0, False: 19.3k]
|
7157 | 0 | return 1; |
7158 | 0 | } |
7159 | 19.3k | if (isinstance) { Branch (7159:9): [True: 9, False: 19.2k]
|
7160 | 9 | asdl_withitem_seq* items; |
7161 | 9 | asdl_stmt_seq* body; |
7162 | 9 | string type_comment; |
7163 | | |
7164 | 9 | if (_PyObject_LookupAttr(obj, state->items, &tmp) < 0) { Branch (7164:13): [True: 0, False: 9]
|
7165 | 0 | return 1; |
7166 | 0 | } |
7167 | 9 | if (tmp == NULL) { Branch (7167:13): [True: 0, False: 9]
|
7168 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"items\" missing from AsyncWith"); |
7169 | 0 | return 1; |
7170 | 0 | } |
7171 | 9 | else { |
7172 | 9 | int res; |
7173 | 9 | Py_ssize_t len; |
7174 | 9 | Py_ssize_t i; |
7175 | 9 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 9 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 9 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7175:17): [True: 0, False: 9]
|
7176 | 0 | PyErr_Format(PyExc_TypeError, "AsyncWith field \"items\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7177 | 0 | goto failed; |
7178 | 0 | } |
7179 | 9 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 9 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7180 | 9 | items = _Py_asdl_withitem_seq_new(len, arena); |
7181 | 9 | if (items == NULL) goto failed; Branch (7181:17): [True: 0, False: 9]
|
7182 | 21 | for (i = 0; i < len; i++) { Branch (7182:25): [True: 12, False: 9]
|
7183 | 12 | withitem_ty val; |
7184 | 12 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 12 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 12 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7185 | 12 | Py_INCREF(tmp2); Line | Count | Source | 512 | 12 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7186 | 12 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncWith' node")) { Branch (7186:21): [True: 0, False: 12]
|
7187 | 0 | goto failed; |
7188 | 0 | } |
7189 | 12 | res = obj2ast_withitem(state, tmp2, &val, arena); |
7190 | 12 | _Py_LeaveRecursiveCall(); |
7191 | 12 | Py_DECREF(tmp2); Line | Count | Source | 548 | 12 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7192 | 12 | if (res != 0) goto failed; Branch (7192:21): [True: 0, False: 12]
|
7193 | 12 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 12 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 12 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7193:21): [True: 0, False: 12]
|
7194 | 0 | PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"items\" changed size during iteration"); |
7195 | 0 | goto failed; |
7196 | 0 | } |
7197 | 12 | asdl_seq_SET(items, i, val); Line | Count | Source | 94 | 12 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 12 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7198 | 12 | } |
7199 | 9 | Py_CLEAR(tmp); Line | Count | Source | 587 | 9 | do { \ | 588 | 9 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 9 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 9, False: 0]
| 590 | 9 | (op) = NULL; \ | 591 | 9 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 9 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 9 | } \ | 593 | 9 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7200 | 9 | } |
7201 | 9 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (7201:13): [True: 0, False: 9]
|
7202 | 0 | return 1; |
7203 | 0 | } |
7204 | 9 | if (tmp == NULL) { Branch (7204:13): [True: 0, False: 9]
|
7205 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncWith"); |
7206 | 0 | return 1; |
7207 | 0 | } |
7208 | 9 | else { |
7209 | 9 | int res; |
7210 | 9 | Py_ssize_t len; |
7211 | 9 | Py_ssize_t i; |
7212 | 9 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 9 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 9 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7212:17): [True: 0, False: 9]
|
7213 | 0 | PyErr_Format(PyExc_TypeError, "AsyncWith field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7214 | 0 | goto failed; |
7215 | 0 | } |
7216 | 9 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 9 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7217 | 9 | body = _Py_asdl_stmt_seq_new(len, arena); |
7218 | 9 | if (body == NULL) goto failed; Branch (7218:17): [True: 0, False: 9]
|
7219 | 18 | for (i = 0; i < len; i++) { Branch (7219:25): [True: 9, False: 9]
|
7220 | 9 | stmt_ty val; |
7221 | 9 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 9 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 9 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7222 | 9 | Py_INCREF(tmp2); Line | Count | Source | 512 | 9 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7223 | 9 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncWith' node")) { Branch (7223:21): [True: 0, False: 9]
|
7224 | 0 | goto failed; |
7225 | 0 | } |
7226 | 9 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7227 | 9 | _Py_LeaveRecursiveCall(); |
7228 | 9 | Py_DECREF(tmp2); Line | Count | Source | 548 | 9 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7229 | 9 | if (res != 0) goto failed; Branch (7229:21): [True: 0, False: 9]
|
7230 | 9 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 9 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7230:21): [True: 0, False: 9]
|
7231 | 0 | PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"body\" changed size during iteration"); |
7232 | 0 | goto failed; |
7233 | 0 | } |
7234 | 9 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 9 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 9 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7235 | 9 | } |
7236 | 9 | Py_CLEAR(tmp); Line | Count | Source | 587 | 9 | do { \ | 588 | 9 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 9 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 9, False: 0]
| 590 | 9 | (op) = NULL; \ | 591 | 9 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 9 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 9 | } \ | 593 | 9 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7237 | 9 | } |
7238 | 9 | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (7238:13): [True: 0, False: 9]
|
7239 | 0 | return 1; |
7240 | 0 | } |
7241 | 9 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 9 | #define Py_None (&_Py_NoneStruct) |
Branch (7241:13): [True: 0, False: 9]
Branch (7241:28): [True: 9, False: 0]
|
7242 | 9 | Py_CLEAR(tmp); Line | Count | Source | 587 | 9 | do { \ | 588 | 9 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 9 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 9, False: 0]
| 590 | 9 | (op) = NULL; \ | 591 | 9 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 9 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 9 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 9 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 9 | } \ | 593 | 9 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7243 | 9 | type_comment = NULL; |
7244 | 9 | } |
7245 | 0 | else { |
7246 | 0 | int res; |
7247 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'AsyncWith' node")) { Branch (7247:17): [True: 0, False: 0]
|
7248 | 0 | goto failed; |
7249 | 0 | } |
7250 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
7251 | 0 | _Py_LeaveRecursiveCall(); |
7252 | 0 | if (res != 0) goto failed; Branch (7252:17): [True: 0, False: 0]
|
7253 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7254 | 0 | } |
7255 | 9 | *out = _PyAST_AsyncWith(items, body, type_comment, lineno, col_offset, |
7256 | 9 | end_lineno, end_col_offset, arena); |
7257 | 9 | if (*out == NULL) goto failed; Branch (7257:13): [True: 0, False: 9]
|
7258 | 9 | return 0; |
7259 | 9 | } |
7260 | 19.2k | tp = state->Match_type; |
7261 | 19.2k | isinstance = PyObject_IsInstance(obj, tp); |
7262 | 19.2k | if (isinstance == -1) { Branch (7262:9): [True: 0, False: 19.2k]
|
7263 | 0 | return 1; |
7264 | 0 | } |
7265 | 19.2k | if (isinstance) { Branch (7265:9): [True: 29, False: 19.2k]
|
7266 | 29 | expr_ty subject; |
7267 | 29 | asdl_match_case_seq* cases; |
7268 | | |
7269 | 29 | if (_PyObject_LookupAttr(obj, state->subject, &tmp) < 0) { Branch (7269:13): [True: 0, False: 29]
|
7270 | 0 | return 1; |
7271 | 0 | } |
7272 | 29 | if (tmp == NULL) { Branch (7272:13): [True: 0, False: 29]
|
7273 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"subject\" missing from Match"); |
7274 | 0 | return 1; |
7275 | 0 | } |
7276 | 29 | else { |
7277 | 29 | int res; |
7278 | 29 | if (_Py_EnterRecursiveCall(" while traversing 'Match' node")) { Branch (7278:17): [True: 0, False: 29]
|
7279 | 0 | goto failed; |
7280 | 0 | } |
7281 | 29 | res = obj2ast_expr(state, tmp, &subject, arena); |
7282 | 29 | _Py_LeaveRecursiveCall(); |
7283 | 29 | if (res != 0) goto failed; Branch (7283:17): [True: 0, False: 29]
|
7284 | 29 | Py_CLEAR(tmp); Line | Count | Source | 587 | 29 | do { \ | 588 | 29 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 29 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 29, False: 0]
| 590 | 29 | (op) = NULL; \ | 591 | 29 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 29 | } \ | 593 | 29 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7285 | 29 | } |
7286 | 29 | if (_PyObject_LookupAttr(obj, state->cases, &tmp) < 0) { Branch (7286:13): [True: 0, False: 29]
|
7287 | 0 | return 1; |
7288 | 0 | } |
7289 | 29 | if (tmp == NULL) { Branch (7289:13): [True: 0, False: 29]
|
7290 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"cases\" missing from Match"); |
7291 | 0 | return 1; |
7292 | 0 | } |
7293 | 29 | else { |
7294 | 29 | int res; |
7295 | 29 | Py_ssize_t len; |
7296 | 29 | Py_ssize_t i; |
7297 | 29 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 29 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 29 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7297:17): [True: 0, False: 29]
|
7298 | 0 | PyErr_Format(PyExc_TypeError, "Match field \"cases\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7299 | 0 | goto failed; |
7300 | 0 | } |
7301 | 29 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 29 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7302 | 29 | cases = _Py_asdl_match_case_seq_new(len, arena); |
7303 | 29 | if (cases == NULL) goto failed; Branch (7303:17): [True: 0, False: 29]
|
7304 | 62 | for (i = 0; i < len; i++) { Branch (7304:25): [True: 33, False: 29]
|
7305 | 33 | match_case_ty val; |
7306 | 33 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 33 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 33 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7307 | 33 | Py_INCREF(tmp2); Line | Count | Source | 512 | 33 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7308 | 33 | if (_Py_EnterRecursiveCall(" while traversing 'Match' node")) { Branch (7308:21): [True: 0, False: 33]
|
7309 | 0 | goto failed; |
7310 | 0 | } |
7311 | 33 | res = obj2ast_match_case(state, tmp2, &val, arena); |
7312 | 33 | _Py_LeaveRecursiveCall(); |
7313 | 33 | Py_DECREF(tmp2); Line | Count | Source | 548 | 33 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7314 | 33 | if (res != 0) goto failed; Branch (7314:21): [True: 0, False: 33]
|
7315 | 33 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 33 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7315:21): [True: 0, False: 33]
|
7316 | 0 | PyErr_SetString(PyExc_RuntimeError, "Match field \"cases\" changed size during iteration"); |
7317 | 0 | goto failed; |
7318 | 0 | } |
7319 | 33 | asdl_seq_SET(cases, i, val); Line | Count | Source | 94 | 33 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 33 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7320 | 33 | } |
7321 | 29 | Py_CLEAR(tmp); Line | Count | Source | 587 | 29 | do { \ | 588 | 29 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 29 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 29, False: 0]
| 590 | 29 | (op) = NULL; \ | 591 | 29 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 29 | } \ | 593 | 29 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7322 | 29 | } |
7323 | 29 | *out = _PyAST_Match(subject, cases, lineno, col_offset, end_lineno, |
7324 | 29 | end_col_offset, arena); |
7325 | 29 | if (*out == NULL) goto failed; Branch (7325:13): [True: 0, False: 29]
|
7326 | 29 | return 0; |
7327 | 29 | } |
7328 | 19.2k | tp = state->Raise_type; |
7329 | 19.2k | isinstance = PyObject_IsInstance(obj, tp); |
7330 | 19.2k | if (isinstance == -1) { Branch (7330:9): [True: 0, False: 19.2k]
|
7331 | 0 | return 1; |
7332 | 0 | } |
7333 | 19.2k | if (isinstance) { Branch (7333:9): [True: 2.31k, False: 16.9k]
|
7334 | 2.31k | expr_ty exc; |
7335 | 2.31k | expr_ty cause; |
7336 | | |
7337 | 2.31k | if (_PyObject_LookupAttr(obj, state->exc, &tmp) < 0) { Branch (7337:13): [True: 0, False: 2.31k]
|
7338 | 0 | return 1; |
7339 | 0 | } |
7340 | 2.31k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 2.31k | #define Py_None (&_Py_NoneStruct) |
Branch (7340:13): [True: 0, False: 2.31k]
Branch (7340:28): [True: 164, False: 2.14k]
|
7341 | 164 | Py_CLEAR(tmp); Line | Count | Source | 587 | 164 | do { \ | 588 | 164 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 164 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 164 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 164 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 164, False: 0]
| 590 | 164 | (op) = NULL; \ | 591 | 164 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 164 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 164 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 164 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 164 | } \ | 593 | 164 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7342 | 164 | exc = NULL; |
7343 | 164 | } |
7344 | 2.14k | else { |
7345 | 2.14k | int res; |
7346 | 2.14k | if (_Py_EnterRecursiveCall(" while traversing 'Raise' node")) { Branch (7346:17): [True: 0, False: 2.14k]
|
7347 | 0 | goto failed; |
7348 | 0 | } |
7349 | 2.14k | res = obj2ast_expr(state, tmp, &exc, arena); |
7350 | 2.14k | _Py_LeaveRecursiveCall(); |
7351 | 2.14k | if (res != 0) goto failed; Branch (7351:17): [True: 0, False: 2.14k]
|
7352 | 2.14k | Py_CLEAR(tmp); Line | Count | Source | 587 | 2.14k | do { \ | 588 | 2.14k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2.14k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.14k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2.14k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2.14k, False: 0]
| 590 | 2.14k | (op) = NULL; \ | 591 | 2.14k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2.14k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.14k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.14k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2.14k | } \ | 593 | 2.14k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7353 | 2.14k | } |
7354 | 2.31k | if (_PyObject_LookupAttr(obj, state->cause, &tmp) < 0) { Branch (7354:13): [True: 0, False: 2.31k]
|
7355 | 0 | return 1; |
7356 | 0 | } |
7357 | 2.31k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 2.31k | #define Py_None (&_Py_NoneStruct) |
Branch (7357:13): [True: 0, False: 2.31k]
Branch (7357:28): [True: 2.18k, False: 133]
|
7358 | 2.18k | Py_CLEAR(tmp); Line | Count | Source | 587 | 2.18k | do { \ | 588 | 2.18k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2.18k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.18k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2.18k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2.18k, False: 0]
| 590 | 2.18k | (op) = NULL; \ | 591 | 2.18k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2.18k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.18k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.18k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2.18k | } \ | 593 | 2.18k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7359 | 2.18k | cause = NULL; |
7360 | 2.18k | } |
7361 | 133 | else { |
7362 | 133 | int res; |
7363 | 133 | if (_Py_EnterRecursiveCall(" while traversing 'Raise' node")) { Branch (7363:17): [True: 0, False: 133]
|
7364 | 0 | goto failed; |
7365 | 0 | } |
7366 | 133 | res = obj2ast_expr(state, tmp, &cause, arena); |
7367 | 133 | _Py_LeaveRecursiveCall(); |
7368 | 133 | if (res != 0) goto failed; Branch (7368:17): [True: 0, False: 133]
|
7369 | 133 | Py_CLEAR(tmp); Line | Count | Source | 587 | 133 | do { \ | 588 | 133 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 133 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 133 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 133 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 133, False: 0]
| 590 | 133 | (op) = NULL; \ | 591 | 133 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 133 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 133 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 133 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 133 | } \ | 593 | 133 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7370 | 133 | } |
7371 | 2.31k | *out = _PyAST_Raise(exc, cause, lineno, col_offset, end_lineno, |
7372 | 2.31k | end_col_offset, arena); |
7373 | 2.31k | if (*out == NULL) goto failed; Branch (7373:13): [True: 0, False: 2.31k]
|
7374 | 2.31k | return 0; |
7375 | 2.31k | } |
7376 | 16.9k | tp = state->Try_type; |
7377 | 16.9k | isinstance = PyObject_IsInstance(obj, tp); |
7378 | 16.9k | if (isinstance == -1) { Branch (7378:9): [True: 0, False: 16.9k]
|
7379 | 0 | return 1; |
7380 | 0 | } |
7381 | 16.9k | if (isinstance) { Branch (7381:9): [True: 1.47k, False: 15.4k]
|
7382 | 1.47k | asdl_stmt_seq* body; |
7383 | 1.47k | asdl_excepthandler_seq* handlers; |
7384 | 1.47k | asdl_stmt_seq* orelse; |
7385 | 1.47k | asdl_stmt_seq* finalbody; |
7386 | | |
7387 | 1.47k | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (7387:13): [True: 0, False: 1.47k]
|
7388 | 0 | return 1; |
7389 | 0 | } |
7390 | 1.47k | if (tmp == NULL) { Branch (7390:13): [True: 0, False: 1.47k]
|
7391 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Try"); |
7392 | 0 | return 1; |
7393 | 0 | } |
7394 | 1.47k | else { |
7395 | 1.47k | int res; |
7396 | 1.47k | Py_ssize_t len; |
7397 | 1.47k | Py_ssize_t i; |
7398 | 1.47k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.47k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.47k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7398:17): [True: 0, False: 1.47k]
|
7399 | 0 | PyErr_Format(PyExc_TypeError, "Try field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7400 | 0 | goto failed; |
7401 | 0 | } |
7402 | 1.47k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.47k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7403 | 1.47k | body = _Py_asdl_stmt_seq_new(len, arena); |
7404 | 1.47k | if (body == NULL) goto failed; Branch (7404:17): [True: 0, False: 1.47k]
|
7405 | 3.58k | for (i = 0; i < len; i++) { Branch (7405:25): [True: 2.11k, False: 1.47k]
|
7406 | 2.11k | stmt_ty val; |
7407 | 2.11k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 2.11k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 2.11k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 2.11k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7408 | 2.11k | Py_INCREF(tmp2); Line | Count | Source | 512 | 2.11k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.11k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.11k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7409 | 2.11k | if (_Py_EnterRecursiveCall(" while traversing 'Try' node")) { Branch (7409:21): [True: 0, False: 2.11k]
|
7410 | 0 | goto failed; |
7411 | 0 | } |
7412 | 2.11k | res = obj2ast_stmt(state, tmp2, &val, arena); |
7413 | 2.11k | _Py_LeaveRecursiveCall(); |
7414 | 2.11k | Py_DECREF(tmp2); Line | Count | Source | 548 | 2.11k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.11k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.11k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7415 | 2.11k | if (res != 0) goto failed; Branch (7415:21): [True: 0, False: 2.11k]
|
7416 | 2.11k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 2.11k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.11k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.11k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7416:21): [True: 0, False: 2.11k]
|
7417 | 0 | PyErr_SetString(PyExc_RuntimeError, "Try field \"body\" changed size during iteration"); |
7418 | 0 | goto failed; |
7419 | 0 | } |
7420 | 2.11k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 2.11k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 2.11k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7421 | 2.11k | } |
7422 | 1.47k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.47k | do { \ | 588 | 1.47k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.47k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.47k, False: 0]
| 590 | 1.47k | (op) = NULL; \ | 591 | 1.47k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.47k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.47k | } \ | 593 | 1.47k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7423 | 1.47k | } |
7424 | 1.47k | if (_PyObject_LookupAttr(obj, state->handlers, &tmp) < 0) { Branch (7424:13): [True: 0, False: 1.47k]
|
7425 | 0 | return 1; |
7426 | 0 | } |
7427 | 1.47k | if (tmp == NULL) { Branch (7427:13): [True: 0, False: 1.47k]
|
7428 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"handlers\" missing from Try"); |
7429 | 0 | return 1; |
7430 | 0 | } |
7431 | 1.47k | else { |
7432 | 1.47k | int res; |
7433 | 1.47k | Py_ssize_t len; |
7434 | 1.47k | Py_ssize_t i; |
7435 | 1.47k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.47k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.47k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7435:17): [True: 0, False: 1.47k]
|
7436 | 0 | PyErr_Format(PyExc_TypeError, "Try field \"handlers\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7437 | 0 | goto failed; |
7438 | 0 | } |
7439 | 1.47k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.47k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7440 | 1.47k | handlers = _Py_asdl_excepthandler_seq_new(len, arena); |
7441 | 1.47k | if (handlers == NULL) goto failed; Branch (7441:17): [True: 0, False: 1.47k]
|
7442 | 2.87k | for (i = 0; i < len; i++) { Branch (7442:25): [True: 1.39k, False: 1.47k]
|
7443 | 1.39k | excepthandler_ty val; |
7444 | 1.39k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 1.39k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 1.39k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7445 | 1.39k | Py_INCREF(tmp2); Line | Count | Source | 512 | 1.39k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7446 | 1.39k | if (_Py_EnterRecursiveCall(" while traversing 'Try' node")) { Branch (7446:21): [True: 0, False: 1.39k]
|
7447 | 0 | goto failed; |
7448 | 0 | } |
7449 | 1.39k | res = obj2ast_excepthandler(state, tmp2, &val, arena); |
7450 | 1.39k | _Py_LeaveRecursiveCall(); |
7451 | 1.39k | Py_DECREF(tmp2); Line | Count | Source | 548 | 1.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7452 | 1.39k | if (res != 0) goto failed; Branch (7452:21): [True: 0, False: 1.39k]
|
7453 | 1.39k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 1.39k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7453:21): [True: 0, False: 1.39k]
|
7454 | 0 | PyErr_SetString(PyExc_RuntimeError, "Try field \"handlers\" changed size during iteration"); |
7455 | 0 | goto failed; |
7456 | 0 | } |
7457 | 1.39k | asdl_seq_SET(handlers, i, val); Line | Count | Source | 94 | 1.39k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 1.39k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7458 | 1.39k | } |
7459 | 1.47k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.47k | do { \ | 588 | 1.47k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.47k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.47k, False: 0]
| 590 | 1.47k | (op) = NULL; \ | 591 | 1.47k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.47k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.47k | } \ | 593 | 1.47k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7460 | 1.47k | } |
7461 | 1.47k | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (7461:13): [True: 0, False: 1.47k]
|
7462 | 0 | return 1; |
7463 | 0 | } |
7464 | 1.47k | if (tmp == NULL) { Branch (7464:13): [True: 0, False: 1.47k]
|
7465 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from Try"); |
7466 | 0 | return 1; |
7467 | 0 | } |
7468 | 1.47k | else { |
7469 | 1.47k | int res; |
7470 | 1.47k | Py_ssize_t len; |
7471 | 1.47k | Py_ssize_t i; |
7472 | 1.47k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.47k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.47k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7472:17): [True: 0, False: 1.47k]
|
7473 | 0 | PyErr_Format(PyExc_TypeError, "Try field \"orelse\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7474 | 0 | goto failed; |
7475 | 0 | } |
7476 | 1.47k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.47k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7477 | 1.47k | orelse = _Py_asdl_stmt_seq_new(len, arena); |
7478 | 1.47k | if (orelse == NULL) goto failed; Branch (7478:17): [True: 0, False: 1.47k]
|
7479 | 1.75k | for (i = 0; i < len; i++) { Branch (7479:25): [True: 280, False: 1.47k]
|
7480 | 280 | stmt_ty val; |
7481 | 280 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 280 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 280 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 280 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7482 | 280 | Py_INCREF(tmp2); Line | Count | Source | 512 | 280 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 280 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 280 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7483 | 280 | if (_Py_EnterRecursiveCall(" while traversing 'Try' node")) { Branch (7483:21): [True: 0, False: 280]
|
7484 | 0 | goto failed; |
7485 | 0 | } |
7486 | 280 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7487 | 280 | _Py_LeaveRecursiveCall(); |
7488 | 280 | Py_DECREF(tmp2); Line | Count | Source | 548 | 280 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 280 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 280 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7489 | 280 | if (res != 0) goto failed; Branch (7489:21): [True: 0, False: 280]
|
7490 | 280 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 280 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 280 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 280 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7490:21): [True: 0, False: 280]
|
7491 | 0 | PyErr_SetString(PyExc_RuntimeError, "Try field \"orelse\" changed size during iteration"); |
7492 | 0 | goto failed; |
7493 | 0 | } |
7494 | 280 | asdl_seq_SET(orelse, i, val); Line | Count | Source | 94 | 280 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 280 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7495 | 280 | } |
7496 | 1.47k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.47k | do { \ | 588 | 1.47k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.47k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.47k, False: 0]
| 590 | 1.47k | (op) = NULL; \ | 591 | 1.47k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.47k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.47k | } \ | 593 | 1.47k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7497 | 1.47k | } |
7498 | 1.47k | if (_PyObject_LookupAttr(obj, state->finalbody, &tmp) < 0) { Branch (7498:13): [True: 0, False: 1.47k]
|
7499 | 0 | return 1; |
7500 | 0 | } |
7501 | 1.47k | if (tmp == NULL) { Branch (7501:13): [True: 0, False: 1.47k]
|
7502 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"finalbody\" missing from Try"); |
7503 | 0 | return 1; |
7504 | 0 | } |
7505 | 1.47k | else { |
7506 | 1.47k | int res; |
7507 | 1.47k | Py_ssize_t len; |
7508 | 1.47k | Py_ssize_t i; |
7509 | 1.47k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.47k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.47k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7509:17): [True: 0, False: 1.47k]
|
7510 | 0 | PyErr_Format(PyExc_TypeError, "Try field \"finalbody\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7511 | 0 | goto failed; |
7512 | 0 | } |
7513 | 1.47k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.47k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7514 | 1.47k | finalbody = _Py_asdl_stmt_seq_new(len, arena); |
7515 | 1.47k | if (finalbody == NULL) goto failed; Branch (7515:17): [True: 0, False: 1.47k]
|
7516 | 1.69k | for (i = 0; i < len; i++) { Branch (7516:25): [True: 221, False: 1.47k]
|
7517 | 221 | stmt_ty val; |
7518 | 221 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 221 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 221 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 221 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7519 | 221 | Py_INCREF(tmp2); Line | Count | Source | 512 | 221 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 221 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 221 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7520 | 221 | if (_Py_EnterRecursiveCall(" while traversing 'Try' node")) { Branch (7520:21): [True: 0, False: 221]
|
7521 | 0 | goto failed; |
7522 | 0 | } |
7523 | 221 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7524 | 221 | _Py_LeaveRecursiveCall(); |
7525 | 221 | Py_DECREF(tmp2); Line | Count | Source | 548 | 221 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 221 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 221 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7526 | 221 | if (res != 0) goto failed; Branch (7526:21): [True: 0, False: 221]
|
7527 | 221 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 221 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 221 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 221 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7527:21): [True: 0, False: 221]
|
7528 | 0 | PyErr_SetString(PyExc_RuntimeError, "Try field \"finalbody\" changed size during iteration"); |
7529 | 0 | goto failed; |
7530 | 0 | } |
7531 | 221 | asdl_seq_SET(finalbody, i, val); Line | Count | Source | 94 | 221 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 221 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7532 | 221 | } |
7533 | 1.47k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.47k | do { \ | 588 | 1.47k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.47k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.47k, False: 0]
| 590 | 1.47k | (op) = NULL; \ | 591 | 1.47k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.47k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.47k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.47k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.47k | } \ | 593 | 1.47k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7534 | 1.47k | } |
7535 | 1.47k | *out = _PyAST_Try(body, handlers, orelse, finalbody, lineno, |
7536 | 1.47k | col_offset, end_lineno, end_col_offset, arena); |
7537 | 1.47k | if (*out == NULL) goto failed; Branch (7537:13): [True: 0, False: 1.47k]
|
7538 | 1.47k | return 0; |
7539 | 1.47k | } |
7540 | 15.4k | tp = state->TryStar_type; |
7541 | 15.4k | isinstance = PyObject_IsInstance(obj, tp); |
7542 | 15.4k | if (isinstance == -1) { Branch (7542:9): [True: 0, False: 15.4k]
|
7543 | 0 | return 1; |
7544 | 0 | } |
7545 | 15.4k | if (isinstance) { Branch (7545:9): [True: 14, False: 15.4k]
|
7546 | 14 | asdl_stmt_seq* body; |
7547 | 14 | asdl_excepthandler_seq* handlers; |
7548 | 14 | asdl_stmt_seq* orelse; |
7549 | 14 | asdl_stmt_seq* finalbody; |
7550 | | |
7551 | 14 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (7551:13): [True: 0, False: 14]
|
7552 | 0 | return 1; |
7553 | 0 | } |
7554 | 14 | if (tmp == NULL) { Branch (7554:13): [True: 0, False: 14]
|
7555 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from TryStar"); |
7556 | 0 | return 1; |
7557 | 0 | } |
7558 | 14 | else { |
7559 | 14 | int res; |
7560 | 14 | Py_ssize_t len; |
7561 | 14 | Py_ssize_t i; |
7562 | 14 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 14 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 14 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7562:17): [True: 0, False: 14]
|
7563 | 0 | PyErr_Format(PyExc_TypeError, "TryStar field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7564 | 0 | goto failed; |
7565 | 0 | } |
7566 | 14 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 14 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7567 | 14 | body = _Py_asdl_stmt_seq_new(len, arena); |
7568 | 14 | if (body == NULL) goto failed; Branch (7568:17): [True: 0, False: 14]
|
7569 | 27 | for (i = 0; i < len; i++) { Branch (7569:25): [True: 13, False: 14]
|
7570 | 13 | stmt_ty val; |
7571 | 13 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 13 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 13 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 13 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7572 | 13 | Py_INCREF(tmp2); Line | Count | Source | 512 | 13 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 13 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 13 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7573 | 13 | if (_Py_EnterRecursiveCall(" while traversing 'TryStar' node")) { Branch (7573:21): [True: 0, False: 13]
|
7574 | 0 | goto failed; |
7575 | 0 | } |
7576 | 13 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7577 | 13 | _Py_LeaveRecursiveCall(); |
7578 | 13 | Py_DECREF(tmp2); Line | Count | Source | 548 | 13 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 13 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 13 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7579 | 13 | if (res != 0) goto failed; Branch (7579:21): [True: 0, False: 13]
|
7580 | 13 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 13 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 13 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 13 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7580:21): [True: 0, False: 13]
|
7581 | 0 | PyErr_SetString(PyExc_RuntimeError, "TryStar field \"body\" changed size during iteration"); |
7582 | 0 | goto failed; |
7583 | 0 | } |
7584 | 13 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 13 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 13 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7585 | 13 | } |
7586 | 14 | Py_CLEAR(tmp); Line | Count | Source | 587 | 14 | do { \ | 588 | 14 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 14 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 14, False: 0]
| 590 | 14 | (op) = NULL; \ | 591 | 14 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 14 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 14 | } \ | 593 | 14 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7587 | 14 | } |
7588 | 14 | if (_PyObject_LookupAttr(obj, state->handlers, &tmp) < 0) { Branch (7588:13): [True: 0, False: 14]
|
7589 | 0 | return 1; |
7590 | 0 | } |
7591 | 14 | if (tmp == NULL) { Branch (7591:13): [True: 0, False: 14]
|
7592 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"handlers\" missing from TryStar"); |
7593 | 0 | return 1; |
7594 | 0 | } |
7595 | 14 | else { |
7596 | 14 | int res; |
7597 | 14 | Py_ssize_t len; |
7598 | 14 | Py_ssize_t i; |
7599 | 14 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 14 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 14 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7599:17): [True: 0, False: 14]
|
7600 | 0 | PyErr_Format(PyExc_TypeError, "TryStar field \"handlers\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7601 | 0 | goto failed; |
7602 | 0 | } |
7603 | 14 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 14 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7604 | 14 | handlers = _Py_asdl_excepthandler_seq_new(len, arena); |
7605 | 14 | if (handlers == NULL) goto failed; Branch (7605:17): [True: 0, False: 14]
|
7606 | 25 | for (i = 0; i < len; i++) { Branch (7606:25): [True: 11, False: 14]
|
7607 | 11 | excepthandler_ty val; |
7608 | 11 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 11 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 11 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7609 | 11 | Py_INCREF(tmp2); Line | Count | Source | 512 | 11 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7610 | 11 | if (_Py_EnterRecursiveCall(" while traversing 'TryStar' node")) { Branch (7610:21): [True: 0, False: 11]
|
7611 | 0 | goto failed; |
7612 | 0 | } |
7613 | 11 | res = obj2ast_excepthandler(state, tmp2, &val, arena); |
7614 | 11 | _Py_LeaveRecursiveCall(); |
7615 | 11 | Py_DECREF(tmp2); Line | Count | Source | 548 | 11 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7616 | 11 | if (res != 0) goto failed; Branch (7616:21): [True: 0, False: 11]
|
7617 | 11 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 11 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 11 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 11 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7617:21): [True: 0, False: 11]
|
7618 | 0 | PyErr_SetString(PyExc_RuntimeError, "TryStar field \"handlers\" changed size during iteration"); |
7619 | 0 | goto failed; |
7620 | 0 | } |
7621 | 11 | asdl_seq_SET(handlers, i, val); Line | Count | Source | 94 | 11 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 11 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7622 | 11 | } |
7623 | 14 | Py_CLEAR(tmp); Line | Count | Source | 587 | 14 | do { \ | 588 | 14 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 14 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 14, False: 0]
| 590 | 14 | (op) = NULL; \ | 591 | 14 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 14 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 14 | } \ | 593 | 14 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7624 | 14 | } |
7625 | 14 | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (7625:13): [True: 0, False: 14]
|
7626 | 0 | return 1; |
7627 | 0 | } |
7628 | 14 | if (tmp == NULL) { Branch (7628:13): [True: 0, False: 14]
|
7629 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from TryStar"); |
7630 | 0 | return 1; |
7631 | 0 | } |
7632 | 14 | else { |
7633 | 14 | int res; |
7634 | 14 | Py_ssize_t len; |
7635 | 14 | Py_ssize_t i; |
7636 | 14 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 14 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 14 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7636:17): [True: 0, False: 14]
|
7637 | 0 | PyErr_Format(PyExc_TypeError, "TryStar field \"orelse\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7638 | 0 | goto failed; |
7639 | 0 | } |
7640 | 14 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 14 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7641 | 14 | orelse = _Py_asdl_stmt_seq_new(len, arena); |
7642 | 14 | if (orelse == NULL) goto failed; Branch (7642:17): [True: 0, False: 14]
|
7643 | 19 | for (i = 0; i < len; i++) { Branch (7643:25): [True: 5, False: 14]
|
7644 | 5 | stmt_ty val; |
7645 | 5 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 5 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 5 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7646 | 5 | Py_INCREF(tmp2); Line | Count | Source | 512 | 5 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7647 | 5 | if (_Py_EnterRecursiveCall(" while traversing 'TryStar' node")) { Branch (7647:21): [True: 0, False: 5]
|
7648 | 0 | goto failed; |
7649 | 0 | } |
7650 | 5 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7651 | 5 | _Py_LeaveRecursiveCall(); |
7652 | 5 | Py_DECREF(tmp2); Line | Count | Source | 548 | 5 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7653 | 5 | if (res != 0) goto failed; Branch (7653:21): [True: 0, False: 5]
|
7654 | 5 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 5 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7654:21): [True: 0, False: 5]
|
7655 | 0 | PyErr_SetString(PyExc_RuntimeError, "TryStar field \"orelse\" changed size during iteration"); |
7656 | 0 | goto failed; |
7657 | 0 | } |
7658 | 5 | asdl_seq_SET(orelse, i, val); Line | Count | Source | 94 | 5 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 5 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7659 | 5 | } |
7660 | 14 | Py_CLEAR(tmp); Line | Count | Source | 587 | 14 | do { \ | 588 | 14 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 14 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 14, False: 0]
| 590 | 14 | (op) = NULL; \ | 591 | 14 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 14 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 14 | } \ | 593 | 14 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7661 | 14 | } |
7662 | 14 | if (_PyObject_LookupAttr(obj, state->finalbody, &tmp) < 0) { Branch (7662:13): [True: 0, False: 14]
|
7663 | 0 | return 1; |
7664 | 0 | } |
7665 | 14 | if (tmp == NULL) { Branch (7665:13): [True: 0, False: 14]
|
7666 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"finalbody\" missing from TryStar"); |
7667 | 0 | return 1; |
7668 | 0 | } |
7669 | 14 | else { |
7670 | 14 | int res; |
7671 | 14 | Py_ssize_t len; |
7672 | 14 | Py_ssize_t i; |
7673 | 14 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 14 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 14 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7673:17): [True: 0, False: 14]
|
7674 | 0 | PyErr_Format(PyExc_TypeError, "TryStar field \"finalbody\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7675 | 0 | goto failed; |
7676 | 0 | } |
7677 | 14 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 14 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7678 | 14 | finalbody = _Py_asdl_stmt_seq_new(len, arena); |
7679 | 14 | if (finalbody == NULL) goto failed; Branch (7679:17): [True: 0, False: 14]
|
7680 | 19 | for (i = 0; i < len; i++) { Branch (7680:25): [True: 5, False: 14]
|
7681 | 5 | stmt_ty val; |
7682 | 5 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 5 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 5 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7683 | 5 | Py_INCREF(tmp2); Line | Count | Source | 512 | 5 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7684 | 5 | if (_Py_EnterRecursiveCall(" while traversing 'TryStar' node")) { Branch (7684:21): [True: 0, False: 5]
|
7685 | 0 | goto failed; |
7686 | 0 | } |
7687 | 5 | res = obj2ast_stmt(state, tmp2, &val, arena); |
7688 | 5 | _Py_LeaveRecursiveCall(); |
7689 | 5 | Py_DECREF(tmp2); Line | Count | Source | 548 | 5 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7690 | 5 | if (res != 0) goto failed; Branch (7690:21): [True: 0, False: 5]
|
7691 | 5 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 5 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7691:21): [True: 0, False: 5]
|
7692 | 0 | PyErr_SetString(PyExc_RuntimeError, "TryStar field \"finalbody\" changed size during iteration"); |
7693 | 0 | goto failed; |
7694 | 0 | } |
7695 | 5 | asdl_seq_SET(finalbody, i, val); Line | Count | Source | 94 | 5 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 5 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7696 | 5 | } |
7697 | 14 | Py_CLEAR(tmp); Line | Count | Source | 587 | 14 | do { \ | 588 | 14 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 14 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 14, False: 0]
| 590 | 14 | (op) = NULL; \ | 591 | 14 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 14 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 14 | } \ | 593 | 14 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7698 | 14 | } |
7699 | 14 | *out = _PyAST_TryStar(body, handlers, orelse, finalbody, lineno, |
7700 | 14 | col_offset, end_lineno, end_col_offset, arena); |
7701 | 14 | if (*out == NULL) goto failed; Branch (7701:13): [True: 0, False: 14]
|
7702 | 14 | return 0; |
7703 | 14 | } |
7704 | 15.4k | tp = state->Assert_type; |
7705 | 15.4k | isinstance = PyObject_IsInstance(obj, tp); |
7706 | 15.4k | if (isinstance == -1) { Branch (7706:9): [True: 0, False: 15.4k]
|
7707 | 0 | return 1; |
7708 | 0 | } |
7709 | 15.4k | if (isinstance) { Branch (7709:9): [True: 223, False: 15.2k]
|
7710 | 223 | expr_ty test; |
7711 | 223 | expr_ty msg; |
7712 | | |
7713 | 223 | if (_PyObject_LookupAttr(obj, state->test, &tmp) < 0) { Branch (7713:13): [True: 0, False: 223]
|
7714 | 0 | return 1; |
7715 | 0 | } |
7716 | 223 | if (tmp == NULL) { Branch (7716:13): [True: 0, False: 223]
|
7717 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from Assert"); |
7718 | 0 | return 1; |
7719 | 0 | } |
7720 | 223 | else { |
7721 | 223 | int res; |
7722 | 223 | if (_Py_EnterRecursiveCall(" while traversing 'Assert' node")) { Branch (7722:17): [True: 0, False: 223]
|
7723 | 0 | goto failed; |
7724 | 0 | } |
7725 | 223 | res = obj2ast_expr(state, tmp, &test, arena); |
7726 | 223 | _Py_LeaveRecursiveCall(); |
7727 | 223 | if (res != 0) goto failed; Branch (7727:17): [True: 0, False: 223]
|
7728 | 223 | Py_CLEAR(tmp); Line | Count | Source | 587 | 223 | do { \ | 588 | 223 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 223 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 223 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 223 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 223, False: 0]
| 590 | 223 | (op) = NULL; \ | 591 | 223 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 223 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 223 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 223 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 223 | } \ | 593 | 223 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7729 | 223 | } |
7730 | 223 | if (_PyObject_LookupAttr(obj, state->msg, &tmp) < 0) { Branch (7730:13): [True: 0, False: 223]
|
7731 | 0 | return 1; |
7732 | 0 | } |
7733 | 223 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 223 | #define Py_None (&_Py_NoneStruct) |
Branch (7733:13): [True: 0, False: 223]
Branch (7733:28): [True: 173, False: 50]
|
7734 | 173 | Py_CLEAR(tmp); Line | Count | Source | 587 | 173 | do { \ | 588 | 173 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 173 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 173 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 173 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 173, False: 0]
| 590 | 173 | (op) = NULL; \ | 591 | 173 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 173 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 173 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 173 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 173 | } \ | 593 | 173 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7735 | 173 | msg = NULL; |
7736 | 173 | } |
7737 | 50 | else { |
7738 | 50 | int res; |
7739 | 50 | if (_Py_EnterRecursiveCall(" while traversing 'Assert' node")) { Branch (7739:17): [True: 0, False: 50]
|
7740 | 0 | goto failed; |
7741 | 0 | } |
7742 | 50 | res = obj2ast_expr(state, tmp, &msg, arena); |
7743 | 50 | _Py_LeaveRecursiveCall(); |
7744 | 50 | if (res != 0) goto failed; Branch (7744:17): [True: 0, False: 50]
|
7745 | 50 | Py_CLEAR(tmp); Line | Count | Source | 587 | 50 | do { \ | 588 | 50 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 50 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 50 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 50 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 50, False: 0]
| 590 | 50 | (op) = NULL; \ | 591 | 50 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 50 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 50 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 50 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 50 | } \ | 593 | 50 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7746 | 50 | } |
7747 | 223 | *out = _PyAST_Assert(test, msg, lineno, col_offset, end_lineno, |
7748 | 223 | end_col_offset, arena); |
7749 | 223 | if (*out == NULL) goto failed; Branch (7749:13): [True: 0, False: 223]
|
7750 | 223 | return 0; |
7751 | 223 | } |
7752 | 15.2k | tp = state->Import_type; |
7753 | 15.2k | isinstance = PyObject_IsInstance(obj, tp); |
7754 | 15.2k | if (isinstance == -1) { Branch (7754:9): [True: 0, False: 15.2k]
|
7755 | 0 | return 1; |
7756 | 0 | } |
7757 | 15.2k | if (isinstance) { Branch (7757:9): [True: 963, False: 14.2k]
|
7758 | 963 | asdl_alias_seq* names; |
7759 | | |
7760 | 963 | if (_PyObject_LookupAttr(obj, state->names, &tmp) < 0) { Branch (7760:13): [True: 0, False: 963]
|
7761 | 0 | return 1; |
7762 | 0 | } |
7763 | 963 | if (tmp == NULL) { Branch (7763:13): [True: 0, False: 963]
|
7764 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Import"); |
7765 | 0 | return 1; |
7766 | 0 | } |
7767 | 963 | else { |
7768 | 963 | int res; |
7769 | 963 | Py_ssize_t len; |
7770 | 963 | Py_ssize_t i; |
7771 | 963 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 963 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 963 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7771:17): [True: 0, False: 963]
|
7772 | 0 | PyErr_Format(PyExc_TypeError, "Import field \"names\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7773 | 0 | goto failed; |
7774 | 0 | } |
7775 | 963 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 963 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 963 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 963 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7776 | 963 | names = _Py_asdl_alias_seq_new(len, arena); |
7777 | 963 | if (names == NULL) goto failed; Branch (7777:17): [True: 0, False: 963]
|
7778 | 1.96k | for (i = 0; i < len; i++) { Branch (7778:25): [True: 997, False: 963]
|
7779 | 997 | alias_ty val; |
7780 | 997 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 997 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 997 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 997 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7781 | 997 | Py_INCREF(tmp2); Line | Count | Source | 512 | 997 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 997 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 997 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7782 | 997 | if (_Py_EnterRecursiveCall(" while traversing 'Import' node")) { Branch (7782:21): [True: 0, False: 997]
|
7783 | 0 | goto failed; |
7784 | 0 | } |
7785 | 997 | res = obj2ast_alias(state, tmp2, &val, arena); |
7786 | 997 | _Py_LeaveRecursiveCall(); |
7787 | 997 | Py_DECREF(tmp2); Line | Count | Source | 548 | 997 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 997 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 997 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7788 | 997 | if (res != 0) goto failed; Branch (7788:21): [True: 0, False: 997]
|
7789 | 997 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 997 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 997 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 997 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7789:21): [True: 0, False: 997]
|
7790 | 0 | PyErr_SetString(PyExc_RuntimeError, "Import field \"names\" changed size during iteration"); |
7791 | 0 | goto failed; |
7792 | 0 | } |
7793 | 997 | asdl_seq_SET(names, i, val); Line | Count | Source | 94 | 997 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 997 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7794 | 997 | } |
7795 | 963 | Py_CLEAR(tmp); Line | Count | Source | 587 | 963 | do { \ | 588 | 963 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 963 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 963 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 963 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 963, False: 0]
| 590 | 963 | (op) = NULL; \ | 591 | 963 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 963 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 963 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 963 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 963 | } \ | 593 | 963 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7796 | 963 | } |
7797 | 963 | *out = _PyAST_Import(names, lineno, col_offset, end_lineno, |
7798 | 963 | end_col_offset, arena); |
7799 | 963 | if (*out == NULL) goto failed; Branch (7799:13): [True: 0, False: 963]
|
7800 | 963 | return 0; |
7801 | 963 | } |
7802 | 14.2k | tp = state->ImportFrom_type; |
7803 | 14.2k | isinstance = PyObject_IsInstance(obj, tp); |
7804 | 14.2k | if (isinstance == -1) { Branch (7804:9): [True: 0, False: 14.2k]
|
7805 | 0 | return 1; |
7806 | 0 | } |
7807 | 14.2k | if (isinstance) { Branch (7807:9): [True: 370, False: 13.9k]
|
7808 | 370 | identifier module; |
7809 | 370 | asdl_alias_seq* names; |
7810 | 370 | int level; |
7811 | | |
7812 | 370 | if (_PyObject_LookupAttr(obj, state->module, &tmp) < 0) { Branch (7812:13): [True: 0, False: 370]
|
7813 | 0 | return 1; |
7814 | 0 | } |
7815 | 370 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 370 | #define Py_None (&_Py_NoneStruct) |
Branch (7815:13): [True: 0, False: 370]
Branch (7815:28): [True: 2, False: 368]
|
7816 | 2 | Py_CLEAR(tmp); Line | Count | Source | 587 | 2 | do { \ | 588 | 2 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2, False: 0]
| 590 | 2 | (op) = NULL; \ | 591 | 2 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2 | } \ | 593 | 2 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7817 | 2 | module = NULL; |
7818 | 2 | } |
7819 | 368 | else { |
7820 | 368 | int res; |
7821 | 368 | if (_Py_EnterRecursiveCall(" while traversing 'ImportFrom' node")) { Branch (7821:17): [True: 0, False: 368]
|
7822 | 0 | goto failed; |
7823 | 0 | } |
7824 | 368 | res = obj2ast_identifier(state, tmp, &module, arena); |
7825 | 368 | _Py_LeaveRecursiveCall(); |
7826 | 368 | if (res != 0) goto failed; Branch (7826:17): [True: 0, False: 368]
|
7827 | 368 | Py_CLEAR(tmp); Line | Count | Source | 587 | 368 | do { \ | 588 | 368 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 368 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 368 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 368 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 368, False: 0]
| 590 | 368 | (op) = NULL; \ | 591 | 368 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 368 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 368 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 368 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 368 | } \ | 593 | 368 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7828 | 368 | } |
7829 | 370 | if (_PyObject_LookupAttr(obj, state->names, &tmp) < 0) { Branch (7829:13): [True: 0, False: 370]
|
7830 | 0 | return 1; |
7831 | 0 | } |
7832 | 370 | if (tmp == NULL) { Branch (7832:13): [True: 0, False: 370]
|
7833 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from ImportFrom"); |
7834 | 0 | return 1; |
7835 | 0 | } |
7836 | 370 | else { |
7837 | 370 | int res; |
7838 | 370 | Py_ssize_t len; |
7839 | 370 | Py_ssize_t i; |
7840 | 370 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 370 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 370 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7840:17): [True: 0, False: 370]
|
7841 | 0 | PyErr_Format(PyExc_TypeError, "ImportFrom field \"names\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7842 | 0 | goto failed; |
7843 | 0 | } |
7844 | 370 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 370 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 370 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 370 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7845 | 370 | names = _Py_asdl_alias_seq_new(len, arena); |
7846 | 370 | if (names == NULL) goto failed; Branch (7846:17): [True: 0, False: 370]
|
7847 | 993 | for (i = 0; i < len; i++) { Branch (7847:25): [True: 623, False: 370]
|
7848 | 623 | alias_ty val; |
7849 | 623 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 623 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 623 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 623 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7850 | 623 | Py_INCREF(tmp2); Line | Count | Source | 512 | 623 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 623 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 623 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7851 | 623 | if (_Py_EnterRecursiveCall(" while traversing 'ImportFrom' node")) { Branch (7851:21): [True: 0, False: 623]
|
7852 | 0 | goto failed; |
7853 | 0 | } |
7854 | 623 | res = obj2ast_alias(state, tmp2, &val, arena); |
7855 | 623 | _Py_LeaveRecursiveCall(); |
7856 | 623 | Py_DECREF(tmp2); Line | Count | Source | 548 | 623 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 623 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 623 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7857 | 623 | if (res != 0) goto failed; Branch (7857:21): [True: 0, False: 623]
|
7858 | 623 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 623 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 623 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 623 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7858:21): [True: 0, False: 623]
|
7859 | 0 | PyErr_SetString(PyExc_RuntimeError, "ImportFrom field \"names\" changed size during iteration"); |
7860 | 0 | goto failed; |
7861 | 0 | } |
7862 | 623 | asdl_seq_SET(names, i, val); Line | Count | Source | 94 | 623 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 623 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7863 | 623 | } |
7864 | 370 | Py_CLEAR(tmp); Line | Count | Source | 587 | 370 | do { \ | 588 | 370 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 370 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 370 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 370 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 370, False: 0]
| 590 | 370 | (op) = NULL; \ | 591 | 370 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 370 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 370 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 370 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 370 | } \ | 593 | 370 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7865 | 370 | } |
7866 | 370 | if (_PyObject_LookupAttr(obj, state->level, &tmp) < 0) { Branch (7866:13): [True: 0, False: 370]
|
7867 | 0 | return 1; |
7868 | 0 | } |
7869 | 370 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 370 | #define Py_None (&_Py_NoneStruct) |
Branch (7869:13): [True: 0, False: 370]
Branch (7869:28): [True: 1, False: 369]
|
7870 | 1 | Py_CLEAR(tmp); Line | Count | Source | 587 | 1 | do { \ | 588 | 1 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1, False: 0]
| 590 | 1 | (op) = NULL; \ | 591 | 1 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1 | } \ | 593 | 1 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7871 | 1 | level = 0; |
7872 | 1 | } |
7873 | 369 | else { |
7874 | 369 | int res; |
7875 | 369 | if (_Py_EnterRecursiveCall(" while traversing 'ImportFrom' node")) { Branch (7875:17): [True: 0, False: 369]
|
7876 | 0 | goto failed; |
7877 | 0 | } |
7878 | 369 | res = obj2ast_int(state, tmp, &level, arena); |
7879 | 369 | _Py_LeaveRecursiveCall(); |
7880 | 369 | if (res != 0) goto failed; Branch (7880:17): [True: 0, False: 369]
|
7881 | 369 | Py_CLEAR(tmp); Line | Count | Source | 587 | 369 | do { \ | 588 | 369 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 369 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 369 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 369 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 369, False: 0]
| 590 | 369 | (op) = NULL; \ | 591 | 369 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 369 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 369 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 369 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 369 | } \ | 593 | 369 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7882 | 369 | } |
7883 | 370 | *out = _PyAST_ImportFrom(module, names, level, lineno, col_offset, |
7884 | 370 | end_lineno, end_col_offset, arena); |
7885 | 370 | if (*out == NULL) goto failed; Branch (7885:13): [True: 0, False: 370]
|
7886 | 370 | return 0; |
7887 | 370 | } |
7888 | 13.9k | tp = state->Global_type; |
7889 | 13.9k | isinstance = PyObject_IsInstance(obj, tp); |
7890 | 13.9k | if (isinstance == -1) { Branch (7890:9): [True: 0, False: 13.9k]
|
7891 | 0 | return 1; |
7892 | 0 | } |
7893 | 13.9k | if (isinstance) { Branch (7893:9): [True: 66, False: 13.8k]
|
7894 | 66 | asdl_identifier_seq* names; |
7895 | | |
7896 | 66 | if (_PyObject_LookupAttr(obj, state->names, &tmp) < 0) { Branch (7896:13): [True: 0, False: 66]
|
7897 | 0 | return 1; |
7898 | 0 | } |
7899 | 66 | if (tmp == NULL) { Branch (7899:13): [True: 0, False: 66]
|
7900 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Global"); |
7901 | 0 | return 1; |
7902 | 0 | } |
7903 | 66 | else { |
7904 | 66 | int res; |
7905 | 66 | Py_ssize_t len; |
7906 | 66 | Py_ssize_t i; |
7907 | 66 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 66 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 66 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7907:17): [True: 0, False: 66]
|
7908 | 0 | PyErr_Format(PyExc_TypeError, "Global field \"names\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7909 | 0 | goto failed; |
7910 | 0 | } |
7911 | 66 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 66 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 66 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 66 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7912 | 66 | names = _Py_asdl_identifier_seq_new(len, arena); |
7913 | 66 | if (names == NULL) goto failed; Branch (7913:17): [True: 0, False: 66]
|
7914 | 162 | for (i = 0; i < len; i++) { Branch (7914:25): [True: 96, False: 66]
|
7915 | 96 | identifier val; |
7916 | 96 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 96 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 96 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 96 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7917 | 96 | Py_INCREF(tmp2); Line | Count | Source | 512 | 96 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 96 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 96 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7918 | 96 | if (_Py_EnterRecursiveCall(" while traversing 'Global' node")) { Branch (7918:21): [True: 0, False: 96]
|
7919 | 0 | goto failed; |
7920 | 0 | } |
7921 | 96 | res = obj2ast_identifier(state, tmp2, &val, arena); |
7922 | 96 | _Py_LeaveRecursiveCall(); |
7923 | 96 | Py_DECREF(tmp2); Line | Count | Source | 548 | 96 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 96 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 96 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7924 | 96 | if (res != 0) goto failed; Branch (7924:21): [True: 0, False: 96]
|
7925 | 96 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 96 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 96 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 96 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7925:21): [True: 0, False: 96]
|
7926 | 0 | PyErr_SetString(PyExc_RuntimeError, "Global field \"names\" changed size during iteration"); |
7927 | 0 | goto failed; |
7928 | 0 | } |
7929 | 96 | asdl_seq_SET(names, i, val); Line | Count | Source | 94 | 96 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 96 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7930 | 96 | } |
7931 | 66 | Py_CLEAR(tmp); Line | Count | Source | 587 | 66 | do { \ | 588 | 66 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 66 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 66 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 66 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 66, False: 0]
| 590 | 66 | (op) = NULL; \ | 591 | 66 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 66 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 66 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 66 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 66 | } \ | 593 | 66 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7932 | 66 | } |
7933 | 66 | *out = _PyAST_Global(names, lineno, col_offset, end_lineno, |
7934 | 66 | end_col_offset, arena); |
7935 | 66 | if (*out == NULL) goto failed; Branch (7935:13): [True: 0, False: 66]
|
7936 | 66 | return 0; |
7937 | 66 | } |
7938 | 13.8k | tp = state->Nonlocal_type; |
7939 | 13.8k | isinstance = PyObject_IsInstance(obj, tp); |
7940 | 13.8k | if (isinstance == -1) { Branch (7940:9): [True: 0, False: 13.8k]
|
7941 | 0 | return 1; |
7942 | 0 | } |
7943 | 13.8k | if (isinstance) { Branch (7943:9): [True: 21, False: 13.8k]
|
7944 | 21 | asdl_identifier_seq* names; |
7945 | | |
7946 | 21 | if (_PyObject_LookupAttr(obj, state->names, &tmp) < 0) { Branch (7946:13): [True: 0, False: 21]
|
7947 | 0 | return 1; |
7948 | 0 | } |
7949 | 21 | if (tmp == NULL) { Branch (7949:13): [True: 0, False: 21]
|
7950 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Nonlocal"); |
7951 | 0 | return 1; |
7952 | 0 | } |
7953 | 21 | else { |
7954 | 21 | int res; |
7955 | 21 | Py_ssize_t len; |
7956 | 21 | Py_ssize_t i; |
7957 | 21 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 21 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 21 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (7957:17): [True: 0, False: 21]
|
7958 | 0 | PyErr_Format(PyExc_TypeError, "Nonlocal field \"names\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7959 | 0 | goto failed; |
7960 | 0 | } |
7961 | 21 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 21 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 21 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 21 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7962 | 21 | names = _Py_asdl_identifier_seq_new(len, arena); |
7963 | 21 | if (names == NULL) goto failed; Branch (7963:17): [True: 0, False: 21]
|
7964 | 50 | for (i = 0; i < len; i++) { Branch (7964:25): [True: 29, False: 21]
|
7965 | 29 | identifier val; |
7966 | 29 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 29 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 29 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7967 | 29 | Py_INCREF(tmp2); Line | Count | Source | 512 | 29 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7968 | 29 | if (_Py_EnterRecursiveCall(" while traversing 'Nonlocal' node")) { Branch (7968:21): [True: 0, False: 29]
|
7969 | 0 | goto failed; |
7970 | 0 | } |
7971 | 29 | res = obj2ast_identifier(state, tmp2, &val, arena); |
7972 | 29 | _Py_LeaveRecursiveCall(); |
7973 | 29 | Py_DECREF(tmp2); Line | Count | Source | 548 | 29 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
7974 | 29 | if (res != 0) goto failed; Branch (7974:21): [True: 0, False: 29]
|
7975 | 29 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 29 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 29 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 29 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (7975:21): [True: 0, False: 29]
|
7976 | 0 | PyErr_SetString(PyExc_RuntimeError, "Nonlocal field \"names\" changed size during iteration"); |
7977 | 0 | goto failed; |
7978 | 0 | } |
7979 | 29 | asdl_seq_SET(names, i, val); Line | Count | Source | 94 | 29 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 29 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
7980 | 29 | } |
7981 | 21 | Py_CLEAR(tmp); Line | Count | Source | 587 | 21 | do { \ | 588 | 21 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 21 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 21 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 21 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 21, False: 0]
| 590 | 21 | (op) = NULL; \ | 591 | 21 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 21 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 21 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 21 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 21 | } \ | 593 | 21 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
7982 | 21 | } |
7983 | 21 | *out = _PyAST_Nonlocal(names, lineno, col_offset, end_lineno, |
7984 | 21 | end_col_offset, arena); |
7985 | 21 | if (*out == NULL) goto failed; Branch (7985:13): [True: 0, False: 21]
|
7986 | 21 | return 0; |
7987 | 21 | } |
7988 | 13.8k | tp = state->Expr_type; |
7989 | 13.8k | isinstance = PyObject_IsInstance(obj, tp); |
7990 | 13.8k | if (isinstance == -1) { Branch (7990:9): [True: 0, False: 13.8k]
|
7991 | 0 | return 1; |
7992 | 0 | } |
7993 | 13.8k | if (isinstance) { Branch (7993:9): [True: 12.3k, False: 1.44k]
|
7994 | 12.3k | expr_ty value; |
7995 | | |
7996 | 12.3k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (7996:13): [True: 0, False: 12.3k]
|
7997 | 0 | return 1; |
7998 | 0 | } |
7999 | 12.3k | if (tmp == NULL) { Branch (7999:13): [True: 0, False: 12.3k]
|
8000 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Expr"); |
8001 | 0 | return 1; |
8002 | 0 | } |
8003 | 12.3k | else { |
8004 | 12.3k | int res; |
8005 | 12.3k | if (_Py_EnterRecursiveCall(" while traversing 'Expr' node")) { Branch (8005:17): [True: 0, False: 12.3k]
|
8006 | 0 | goto failed; |
8007 | 0 | } |
8008 | 12.3k | res = obj2ast_expr(state, tmp, &value, arena); |
8009 | 12.3k | _Py_LeaveRecursiveCall(); |
8010 | 12.3k | if (res != 0) goto failed; Branch (8010:17): [True: 3, False: 12.3k]
|
8011 | 12.3k | Py_CLEAR(tmp); Line | Count | Source | 587 | 12.3k | do { \ | 588 | 12.3k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 12.3k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 12.3k, False: 0]
| 590 | 12.3k | (op) = NULL; \ | 591 | 12.3k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 12.3k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 12.3k | } \ | 593 | 12.3k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8012 | 12.3k | } |
8013 | 12.3k | *out = _PyAST_Expr(value, lineno, col_offset, end_lineno, |
8014 | 12.3k | end_col_offset, arena); |
8015 | 12.3k | if (*out == NULL) goto failed; Branch (8015:13): [True: 0, False: 12.3k]
|
8016 | 12.3k | return 0; |
8017 | 12.3k | } |
8018 | 1.44k | tp = state->Pass_type; |
8019 | 1.44k | isinstance = PyObject_IsInstance(obj, tp); |
8020 | 1.44k | if (isinstance == -1) { Branch (8020:9): [True: 0, False: 1.44k]
|
8021 | 0 | return 1; |
8022 | 0 | } |
8023 | 1.44k | if (isinstance) { Branch (8023:9): [True: 821, False: 624]
|
8024 | | |
8025 | 821 | *out = _PyAST_Pass(lineno, col_offset, end_lineno, end_col_offset, |
8026 | 821 | arena); |
8027 | 821 | if (*out == NULL) goto failed; Branch (8027:13): [True: 0, False: 821]
|
8028 | 821 | return 0; |
8029 | 821 | } |
8030 | 624 | tp = state->Break_type; |
8031 | 624 | isinstance = PyObject_IsInstance(obj, tp); |
8032 | 624 | if (isinstance == -1) { Branch (8032:9): [True: 0, False: 624]
|
8033 | 0 | return 1; |
8034 | 0 | } |
8035 | 624 | if (isinstance) { Branch (8035:9): [True: 358, False: 266]
|
8036 | | |
8037 | 358 | *out = _PyAST_Break(lineno, col_offset, end_lineno, end_col_offset, |
8038 | 358 | arena); |
8039 | 358 | if (*out == NULL) goto failed; Branch (8039:13): [True: 0, False: 358]
|
8040 | 358 | return 0; |
8041 | 358 | } |
8042 | 266 | tp = state->Continue_type; |
8043 | 266 | isinstance = PyObject_IsInstance(obj, tp); |
8044 | 266 | if (isinstance == -1) { Branch (8044:9): [True: 0, False: 266]
|
8045 | 0 | return 1; |
8046 | 0 | } |
8047 | 266 | if (isinstance) { Branch (8047:9): [True: 266, False: 0]
|
8048 | | |
8049 | 266 | *out = _PyAST_Continue(lineno, col_offset, end_lineno, end_col_offset, |
8050 | 266 | arena); |
8051 | 266 | if (*out == NULL) goto failed; Branch (8051:13): [True: 0, False: 266]
|
8052 | 266 | return 0; |
8053 | 266 | } |
8054 | | |
8055 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of stmt, but got %R", obj); |
8056 | 5 | failed: |
8057 | 5 | Py_XDECREF(tmp); Line | Count | Source | 613 | 5 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8058 | 5 | return 1; |
8059 | 0 | } |
8060 | | |
8061 | | int |
8062 | | obj2ast_expr(struct ast_state *state, PyObject* obj, expr_ty* out, PyArena* |
8063 | | arena) |
8064 | 267k | { |
8065 | 267k | int isinstance; |
8066 | | |
8067 | 267k | PyObject *tmp = NULL; |
8068 | 267k | PyObject *tp; |
8069 | 267k | int lineno; |
8070 | 267k | int col_offset; |
8071 | 267k | int end_lineno; |
8072 | 267k | int end_col_offset; |
8073 | | |
8074 | 267k | if (obj == Py_None) {Line | Count | Source | 654 | 267k | #define Py_None (&_Py_NoneStruct) |
Branch (8074:9): [True: 66, False: 267k]
|
8075 | 66 | *out = NULL; |
8076 | 66 | return 0; |
8077 | 66 | } |
8078 | 267k | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (8078:9): [True: 0, False: 267k]
|
8079 | 0 | return 1; |
8080 | 0 | } |
8081 | 267k | if (tmp == NULL) { Branch (8081:9): [True: 0, False: 267k]
|
8082 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from expr"); |
8083 | 0 | return 1; |
8084 | 0 | } |
8085 | 267k | else { |
8086 | 267k | int res; |
8087 | 267k | if (_Py_EnterRecursiveCall(" while traversing 'expr' node")) { Branch (8087:13): [True: 2, False: 267k]
|
8088 | 2 | goto failed; |
8089 | 2 | } |
8090 | 267k | res = obj2ast_int(state, tmp, &lineno, arena); |
8091 | 267k | _Py_LeaveRecursiveCall(); |
8092 | 267k | if (res != 0) goto failed; Branch (8092:13): [True: 0, False: 267k]
|
8093 | 267k | Py_CLEAR(tmp); Line | Count | Source | 587 | 267k | do { \ | 588 | 267k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 267k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 267k, False: 0]
| 590 | 267k | (op) = NULL; \ | 591 | 267k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 267k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 267k | } \ | 593 | 267k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8094 | 267k | } |
8095 | 267k | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (8095:9): [True: 0, False: 267k]
|
8096 | 0 | return 1; |
8097 | 0 | } |
8098 | 267k | if (tmp == NULL) { Branch (8098:9): [True: 0, False: 267k]
|
8099 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from expr"); |
8100 | 0 | return 1; |
8101 | 0 | } |
8102 | 267k | else { |
8103 | 267k | int res; |
8104 | 267k | if (_Py_EnterRecursiveCall(" while traversing 'expr' node")) { Branch (8104:13): [True: 0, False: 267k]
|
8105 | 0 | goto failed; |
8106 | 0 | } |
8107 | 267k | res = obj2ast_int(state, tmp, &col_offset, arena); |
8108 | 267k | _Py_LeaveRecursiveCall(); |
8109 | 267k | if (res != 0) goto failed; Branch (8109:13): [True: 0, False: 267k]
|
8110 | 267k | Py_CLEAR(tmp); Line | Count | Source | 587 | 267k | do { \ | 588 | 267k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 267k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 267k, False: 0]
| 590 | 267k | (op) = NULL; \ | 591 | 267k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 267k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 267k | } \ | 593 | 267k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8111 | 267k | } |
8112 | 267k | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (8112:9): [True: 0, False: 267k]
|
8113 | 0 | return 1; |
8114 | 0 | } |
8115 | 267k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 267k | #define Py_None (&_Py_NoneStruct) |
Branch (8115:9): [True: 0, False: 267k]
Branch (8115:24): [True: 85, False: 267k]
|
8116 | 85 | Py_CLEAR(tmp); Line | Count | Source | 587 | 85 | do { \ | 588 | 85 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 85 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 85 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 85 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 85, False: 0]
| 590 | 85 | (op) = NULL; \ | 591 | 85 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 85 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 85 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 85 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 85 | } \ | 593 | 85 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8117 | 85 | end_lineno = lineno; |
8118 | 85 | } |
8119 | 267k | else { |
8120 | 267k | int res; |
8121 | 267k | if (_Py_EnterRecursiveCall(" while traversing 'expr' node")) { Branch (8121:13): [True: 0, False: 267k]
|
8122 | 0 | goto failed; |
8123 | 0 | } |
8124 | 267k | res = obj2ast_int(state, tmp, &end_lineno, arena); |
8125 | 267k | _Py_LeaveRecursiveCall(); |
8126 | 267k | if (res != 0) goto failed; Branch (8126:13): [True: 0, False: 267k]
|
8127 | 267k | Py_CLEAR(tmp); Line | Count | Source | 587 | 267k | do { \ | 588 | 267k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 267k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 267k, False: 0]
| 590 | 267k | (op) = NULL; \ | 591 | 267k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 267k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 267k | } \ | 593 | 267k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8128 | 267k | } |
8129 | 267k | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (8129:9): [True: 0, False: 267k]
|
8130 | 0 | return 1; |
8131 | 0 | } |
8132 | 267k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 267k | #define Py_None (&_Py_NoneStruct) |
Branch (8132:9): [True: 0, False: 267k]
Branch (8132:24): [True: 85, False: 267k]
|
8133 | 85 | Py_CLEAR(tmp); Line | Count | Source | 587 | 85 | do { \ | 588 | 85 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 85 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 85 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 85 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 85, False: 0]
| 590 | 85 | (op) = NULL; \ | 591 | 85 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 85 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 85 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 85 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 85 | } \ | 593 | 85 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8134 | 85 | end_col_offset = col_offset; |
8135 | 85 | } |
8136 | 267k | else { |
8137 | 267k | int res; |
8138 | 267k | if (_Py_EnterRecursiveCall(" while traversing 'expr' node")) { Branch (8138:13): [True: 0, False: 267k]
|
8139 | 0 | goto failed; |
8140 | 0 | } |
8141 | 267k | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
8142 | 267k | _Py_LeaveRecursiveCall(); |
8143 | 267k | if (res != 0) goto failed; Branch (8143:13): [True: 0, False: 267k]
|
8144 | 267k | Py_CLEAR(tmp); Line | Count | Source | 587 | 267k | do { \ | 588 | 267k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 267k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 267k, False: 0]
| 590 | 267k | (op) = NULL; \ | 591 | 267k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 267k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 267k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 267k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 267k | } \ | 593 | 267k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8145 | 267k | } |
8146 | 267k | tp = state->BoolOp_type; |
8147 | 267k | isinstance = PyObject_IsInstance(obj, tp); |
8148 | 267k | if (isinstance == -1) { Branch (8148:9): [True: 0, False: 267k]
|
8149 | 0 | return 1; |
8150 | 0 | } |
8151 | 267k | if (isinstance) { Branch (8151:9): [True: 2.06k, False: 265k]
|
8152 | 2.06k | boolop_ty op; |
8153 | 2.06k | asdl_expr_seq* values; |
8154 | | |
8155 | 2.06k | if (_PyObject_LookupAttr(obj, state->op, &tmp) < 0) { Branch (8155:13): [True: 0, False: 2.06k]
|
8156 | 0 | return 1; |
8157 | 0 | } |
8158 | 2.06k | if (tmp == NULL) { Branch (8158:13): [True: 0, False: 2.06k]
|
8159 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from BoolOp"); |
8160 | 0 | return 1; |
8161 | 0 | } |
8162 | 2.06k | else { |
8163 | 2.06k | int res; |
8164 | 2.06k | if (_Py_EnterRecursiveCall(" while traversing 'BoolOp' node")) { Branch (8164:17): [True: 0, False: 2.06k]
|
8165 | 0 | goto failed; |
8166 | 0 | } |
8167 | 2.06k | res = obj2ast_boolop(state, tmp, &op, arena); |
8168 | 2.06k | _Py_LeaveRecursiveCall(); |
8169 | 2.06k | if (res != 0) goto failed; Branch (8169:17): [True: 0, False: 2.06k]
|
8170 | 2.06k | Py_CLEAR(tmp); Line | Count | Source | 587 | 2.06k | do { \ | 588 | 2.06k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2.06k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2.06k, False: 0]
| 590 | 2.06k | (op) = NULL; \ | 591 | 2.06k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2.06k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2.06k | } \ | 593 | 2.06k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8171 | 2.06k | } |
8172 | 2.06k | if (_PyObject_LookupAttr(obj, state->values, &tmp) < 0) { Branch (8172:13): [True: 0, False: 2.06k]
|
8173 | 0 | return 1; |
8174 | 0 | } |
8175 | 2.06k | if (tmp == NULL) { Branch (8175:13): [True: 0, False: 2.06k]
|
8176 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from BoolOp"); |
8177 | 0 | return 1; |
8178 | 0 | } |
8179 | 2.06k | else { |
8180 | 2.06k | int res; |
8181 | 2.06k | Py_ssize_t len; |
8182 | 2.06k | Py_ssize_t i; |
8183 | 2.06k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 2.06k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 2.06k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8183:17): [True: 0, False: 2.06k]
|
8184 | 0 | PyErr_Format(PyExc_TypeError, "BoolOp field \"values\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8185 | 0 | goto failed; |
8186 | 0 | } |
8187 | 2.06k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 2.06k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8188 | 2.06k | values = _Py_asdl_expr_seq_new(len, arena); |
8189 | 2.06k | if (values == NULL) goto failed; Branch (8189:17): [True: 0, False: 2.06k]
|
8190 | 6.46k | for (i = 0; i < len; i++) { Branch (8190:25): [True: 4.39k, False: 2.06k]
|
8191 | 4.39k | expr_ty val; |
8192 | 4.39k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 4.39k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 4.39k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 4.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8193 | 4.39k | Py_INCREF(tmp2); Line | Count | Source | 512 | 4.39k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8194 | 4.39k | if (_Py_EnterRecursiveCall(" while traversing 'BoolOp' node")) { Branch (8194:21): [True: 0, False: 4.39k]
|
8195 | 0 | goto failed; |
8196 | 0 | } |
8197 | 4.39k | res = obj2ast_expr(state, tmp2, &val, arena); |
8198 | 4.39k | _Py_LeaveRecursiveCall(); |
8199 | 4.39k | Py_DECREF(tmp2); Line | Count | Source | 548 | 4.39k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8200 | 4.39k | if (res != 0) goto failed; Branch (8200:21): [True: 0, False: 4.39k]
|
8201 | 4.39k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 4.39k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.39k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.39k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8201:21): [True: 0, False: 4.39k]
|
8202 | 0 | PyErr_SetString(PyExc_RuntimeError, "BoolOp field \"values\" changed size during iteration"); |
8203 | 0 | goto failed; |
8204 | 0 | } |
8205 | 4.39k | asdl_seq_SET(values, i, val); Line | Count | Source | 94 | 4.39k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 4.39k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8206 | 4.39k | } |
8207 | 2.06k | Py_CLEAR(tmp); Line | Count | Source | 587 | 2.06k | do { \ | 588 | 2.06k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2.06k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2.06k, False: 0]
| 590 | 2.06k | (op) = NULL; \ | 591 | 2.06k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2.06k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.06k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.06k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2.06k | } \ | 593 | 2.06k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8208 | 2.06k | } |
8209 | 2.06k | *out = _PyAST_BoolOp(op, values, lineno, col_offset, end_lineno, |
8210 | 2.06k | end_col_offset, arena); |
8211 | 2.06k | if (*out == NULL) goto failed; Branch (8211:13): [True: 0, False: 2.06k]
|
8212 | 2.06k | return 0; |
8213 | 2.06k | } |
8214 | 265k | tp = state->NamedExpr_type; |
8215 | 265k | isinstance = PyObject_IsInstance(obj, tp); |
8216 | 265k | if (isinstance == -1) { Branch (8216:9): [True: 0, False: 265k]
|
8217 | 0 | return 1; |
8218 | 0 | } |
8219 | 265k | if (isinstance) { Branch (8219:9): [True: 22, False: 265k]
|
8220 | 22 | expr_ty target; |
8221 | 22 | expr_ty value; |
8222 | | |
8223 | 22 | if (_PyObject_LookupAttr(obj, state->target, &tmp) < 0) { Branch (8223:13): [True: 0, False: 22]
|
8224 | 0 | return 1; |
8225 | 0 | } |
8226 | 22 | if (tmp == NULL) { Branch (8226:13): [True: 0, False: 22]
|
8227 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from NamedExpr"); |
8228 | 0 | return 1; |
8229 | 0 | } |
8230 | 22 | else { |
8231 | 22 | int res; |
8232 | 22 | if (_Py_EnterRecursiveCall(" while traversing 'NamedExpr' node")) { Branch (8232:17): [True: 0, False: 22]
|
8233 | 0 | goto failed; |
8234 | 0 | } |
8235 | 22 | res = obj2ast_expr(state, tmp, &target, arena); |
8236 | 22 | _Py_LeaveRecursiveCall(); |
8237 | 22 | if (res != 0) goto failed; Branch (8237:17): [True: 0, False: 22]
|
8238 | 22 | Py_CLEAR(tmp); Line | Count | Source | 587 | 22 | do { \ | 588 | 22 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 22 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 22, False: 0]
| 590 | 22 | (op) = NULL; \ | 591 | 22 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 22 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 22 | } \ | 593 | 22 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8239 | 22 | } |
8240 | 22 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (8240:13): [True: 0, False: 22]
|
8241 | 0 | return 1; |
8242 | 0 | } |
8243 | 22 | if (tmp == NULL) { Branch (8243:13): [True: 0, False: 22]
|
8244 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from NamedExpr"); |
8245 | 0 | return 1; |
8246 | 0 | } |
8247 | 22 | else { |
8248 | 22 | int res; |
8249 | 22 | if (_Py_EnterRecursiveCall(" while traversing 'NamedExpr' node")) { Branch (8249:17): [True: 0, False: 22]
|
8250 | 0 | goto failed; |
8251 | 0 | } |
8252 | 22 | res = obj2ast_expr(state, tmp, &value, arena); |
8253 | 22 | _Py_LeaveRecursiveCall(); |
8254 | 22 | if (res != 0) goto failed; Branch (8254:17): [True: 0, False: 22]
|
8255 | 22 | Py_CLEAR(tmp); Line | Count | Source | 587 | 22 | do { \ | 588 | 22 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 22 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 22, False: 0]
| 590 | 22 | (op) = NULL; \ | 591 | 22 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 22 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 22 | } \ | 593 | 22 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8256 | 22 | } |
8257 | 22 | *out = _PyAST_NamedExpr(target, value, lineno, col_offset, end_lineno, |
8258 | 22 | end_col_offset, arena); |
8259 | 22 | if (*out == NULL) goto failed; Branch (8259:13): [True: 0, False: 22]
|
8260 | 22 | return 0; |
8261 | 22 | } |
8262 | 265k | tp = state->BinOp_type; |
8263 | 265k | isinstance = PyObject_IsInstance(obj, tp); |
8264 | 265k | if (isinstance == -1) { Branch (8264:9): [True: 0, False: 265k]
|
8265 | 0 | return 1; |
8266 | 0 | } |
8267 | 265k | if (isinstance) { Branch (8267:9): [True: 6.63k, False: 258k]
|
8268 | 6.63k | expr_ty left; |
8269 | 6.63k | operator_ty op; |
8270 | 6.63k | expr_ty right; |
8271 | | |
8272 | 6.63k | if (_PyObject_LookupAttr(obj, state->left, &tmp) < 0) { Branch (8272:13): [True: 0, False: 6.63k]
|
8273 | 0 | return 1; |
8274 | 0 | } |
8275 | 6.63k | if (tmp == NULL) { Branch (8275:13): [True: 0, False: 6.63k]
|
8276 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"left\" missing from BinOp"); |
8277 | 0 | return 1; |
8278 | 0 | } |
8279 | 6.63k | else { |
8280 | 6.63k | int res; |
8281 | 6.63k | if (_Py_EnterRecursiveCall(" while traversing 'BinOp' node")) { Branch (8281:17): [True: 0, False: 6.63k]
|
8282 | 0 | goto failed; |
8283 | 0 | } |
8284 | 6.63k | res = obj2ast_expr(state, tmp, &left, arena); |
8285 | 6.63k | _Py_LeaveRecursiveCall(); |
8286 | 6.63k | if (res != 0) goto failed; Branch (8286:17): [True: 0, False: 6.63k]
|
8287 | 6.63k | Py_CLEAR(tmp); Line | Count | Source | 587 | 6.63k | do { \ | 588 | 6.63k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6.63k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6.63k, False: 0]
| 590 | 6.63k | (op) = NULL; \ | 591 | 6.63k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6.63k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6.63k | } \ | 593 | 6.63k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8288 | 6.63k | } |
8289 | 6.63k | if (_PyObject_LookupAttr(obj, state->op, &tmp) < 0) { Branch (8289:13): [True: 0, False: 6.63k]
|
8290 | 0 | return 1; |
8291 | 0 | } |
8292 | 6.63k | if (tmp == NULL) { Branch (8292:13): [True: 0, False: 6.63k]
|
8293 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from BinOp"); |
8294 | 0 | return 1; |
8295 | 0 | } |
8296 | 6.63k | else { |
8297 | 6.63k | int res; |
8298 | 6.63k | if (_Py_EnterRecursiveCall(" while traversing 'BinOp' node")) { Branch (8298:17): [True: 0, False: 6.63k]
|
8299 | 0 | goto failed; |
8300 | 0 | } |
8301 | 6.63k | res = obj2ast_operator(state, tmp, &op, arena); |
8302 | 6.63k | _Py_LeaveRecursiveCall(); |
8303 | 6.63k | if (res != 0) goto failed; Branch (8303:17): [True: 0, False: 6.63k]
|
8304 | 6.63k | Py_CLEAR(tmp); Line | Count | Source | 587 | 6.63k | do { \ | 588 | 6.63k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6.63k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6.63k, False: 0]
| 590 | 6.63k | (op) = NULL; \ | 591 | 6.63k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6.63k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6.63k | } \ | 593 | 6.63k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8305 | 6.63k | } |
8306 | 6.63k | if (_PyObject_LookupAttr(obj, state->right, &tmp) < 0) { Branch (8306:13): [True: 0, False: 6.63k]
|
8307 | 0 | return 1; |
8308 | 0 | } |
8309 | 6.63k | if (tmp == NULL) { Branch (8309:13): [True: 0, False: 6.63k]
|
8310 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"right\" missing from BinOp"); |
8311 | 0 | return 1; |
8312 | 0 | } |
8313 | 6.63k | else { |
8314 | 6.63k | int res; |
8315 | 6.63k | if (_Py_EnterRecursiveCall(" while traversing 'BinOp' node")) { Branch (8315:17): [True: 0, False: 6.63k]
|
8316 | 0 | goto failed; |
8317 | 0 | } |
8318 | 6.63k | res = obj2ast_expr(state, tmp, &right, arena); |
8319 | 6.63k | _Py_LeaveRecursiveCall(); |
8320 | 6.63k | if (res != 0) goto failed; Branch (8320:17): [True: 0, False: 6.63k]
|
8321 | 6.63k | Py_CLEAR(tmp); Line | Count | Source | 587 | 6.63k | do { \ | 588 | 6.63k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6.63k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6.63k, False: 0]
| 590 | 6.63k | (op) = NULL; \ | 591 | 6.63k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6.63k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6.63k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6.63k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6.63k | } \ | 593 | 6.63k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8322 | 6.63k | } |
8323 | 6.63k | *out = _PyAST_BinOp(left, op, right, lineno, col_offset, end_lineno, |
8324 | 6.63k | end_col_offset, arena); |
8325 | 6.63k | if (*out == NULL) goto failed; Branch (8325:13): [True: 0, False: 6.63k]
|
8326 | 6.63k | return 0; |
8327 | 6.63k | } |
8328 | 258k | tp = state->UnaryOp_type; |
8329 | 258k | isinstance = PyObject_IsInstance(obj, tp); |
8330 | 258k | if (isinstance == -1) { Branch (8330:9): [True: 0, False: 258k]
|
8331 | 0 | return 1; |
8332 | 0 | } |
8333 | 258k | if (isinstance) { Branch (8333:9): [True: 3.08k, False: 255k]
|
8334 | 3.08k | unaryop_ty op; |
8335 | 3.08k | expr_ty operand; |
8336 | | |
8337 | 3.08k | if (_PyObject_LookupAttr(obj, state->op, &tmp) < 0) { Branch (8337:13): [True: 0, False: 3.08k]
|
8338 | 0 | return 1; |
8339 | 0 | } |
8340 | 3.08k | if (tmp == NULL) { Branch (8340:13): [True: 0, False: 3.08k]
|
8341 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from UnaryOp"); |
8342 | 0 | return 1; |
8343 | 0 | } |
8344 | 3.08k | else { |
8345 | 3.08k | int res; |
8346 | 3.08k | if (_Py_EnterRecursiveCall(" while traversing 'UnaryOp' node")) { Branch (8346:17): [True: 0, False: 3.08k]
|
8347 | 0 | goto failed; |
8348 | 0 | } |
8349 | 3.08k | res = obj2ast_unaryop(state, tmp, &op, arena); |
8350 | 3.08k | _Py_LeaveRecursiveCall(); |
8351 | 3.08k | if (res != 0) goto failed; Branch (8351:17): [True: 0, False: 3.08k]
|
8352 | 3.08k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.08k | do { \ | 588 | 3.08k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.08k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.08k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.08k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.08k, False: 0]
| 590 | 3.08k | (op) = NULL; \ | 591 | 3.08k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.08k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.08k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.08k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.08k | } \ | 593 | 3.08k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8353 | 3.08k | } |
8354 | 3.08k | if (_PyObject_LookupAttr(obj, state->operand, &tmp) < 0) { Branch (8354:13): [True: 0, False: 3.08k]
|
8355 | 0 | return 1; |
8356 | 0 | } |
8357 | 3.08k | if (tmp == NULL) { Branch (8357:13): [True: 0, False: 3.08k]
|
8358 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"operand\" missing from UnaryOp"); |
8359 | 0 | return 1; |
8360 | 0 | } |
8361 | 3.08k | else { |
8362 | 3.08k | int res; |
8363 | 3.08k | if (_Py_EnterRecursiveCall(" while traversing 'UnaryOp' node")) { Branch (8363:17): [True: 0, False: 3.08k]
|
8364 | 0 | goto failed; |
8365 | 0 | } |
8366 | 3.08k | res = obj2ast_expr(state, tmp, &operand, arena); |
8367 | 3.08k | _Py_LeaveRecursiveCall(); |
8368 | 3.08k | if (res != 0) goto failed; Branch (8368:17): [True: 84, False: 3.00k]
|
8369 | 3.00k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.00k | do { \ | 588 | 3.00k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.00k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.00k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.00k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.00k, False: 0]
| 590 | 3.00k | (op) = NULL; \ | 591 | 3.00k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.00k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.00k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.00k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.00k | } \ | 593 | 3.00k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8370 | 3.00k | } |
8371 | 3.00k | *out = _PyAST_UnaryOp(op, operand, lineno, col_offset, end_lineno, |
8372 | 3.00k | end_col_offset, arena); |
8373 | 3.00k | if (*out == NULL) goto failed; Branch (8373:13): [True: 0, False: 3.00k]
|
8374 | 3.00k | return 0; |
8375 | 3.00k | } |
8376 | 255k | tp = state->Lambda_type; |
8377 | 255k | isinstance = PyObject_IsInstance(obj, tp); |
8378 | 255k | if (isinstance == -1) { Branch (8378:9): [True: 0, False: 255k]
|
8379 | 0 | return 1; |
8380 | 0 | } |
8381 | 255k | if (isinstance) { Branch (8381:9): [True: 168, False: 255k]
|
8382 | 168 | arguments_ty args; |
8383 | 168 | expr_ty body; |
8384 | | |
8385 | 168 | if (_PyObject_LookupAttr(obj, state->args, &tmp) < 0) { Branch (8385:13): [True: 0, False: 168]
|
8386 | 0 | return 1; |
8387 | 0 | } |
8388 | 168 | if (tmp == NULL) { Branch (8388:13): [True: 0, False: 168]
|
8389 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from Lambda"); |
8390 | 0 | return 1; |
8391 | 0 | } |
8392 | 168 | else { |
8393 | 168 | int res; |
8394 | 168 | if (_Py_EnterRecursiveCall(" while traversing 'Lambda' node")) { Branch (8394:17): [True: 0, False: 168]
|
8395 | 0 | goto failed; |
8396 | 0 | } |
8397 | 168 | res = obj2ast_arguments(state, tmp, &args, arena); |
8398 | 168 | _Py_LeaveRecursiveCall(); |
8399 | 168 | if (res != 0) goto failed; Branch (8399:17): [True: 0, False: 168]
|
8400 | 168 | Py_CLEAR(tmp); Line | Count | Source | 587 | 168 | do { \ | 588 | 168 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 168 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 168 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 168 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 168, False: 0]
| 590 | 168 | (op) = NULL; \ | 591 | 168 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 168 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 168 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 168 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 168 | } \ | 593 | 168 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8401 | 168 | } |
8402 | 168 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (8402:13): [True: 0, False: 168]
|
8403 | 0 | return 1; |
8404 | 0 | } |
8405 | 168 | if (tmp == NULL) { Branch (8405:13): [True: 0, False: 168]
|
8406 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Lambda"); |
8407 | 0 | return 1; |
8408 | 0 | } |
8409 | 168 | else { |
8410 | 168 | int res; |
8411 | 168 | if (_Py_EnterRecursiveCall(" while traversing 'Lambda' node")) { Branch (8411:17): [True: 0, False: 168]
|
8412 | 0 | goto failed; |
8413 | 0 | } |
8414 | 168 | res = obj2ast_expr(state, tmp, &body, arena); |
8415 | 168 | _Py_LeaveRecursiveCall(); |
8416 | 168 | if (res != 0) goto failed; Branch (8416:17): [True: 0, False: 168]
|
8417 | 168 | Py_CLEAR(tmp); Line | Count | Source | 587 | 168 | do { \ | 588 | 168 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 168 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 168 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 168 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 168, False: 0]
| 590 | 168 | (op) = NULL; \ | 591 | 168 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 168 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 168 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 168 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 168 | } \ | 593 | 168 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8418 | 168 | } |
8419 | 168 | *out = _PyAST_Lambda(args, body, lineno, col_offset, end_lineno, |
8420 | 168 | end_col_offset, arena); |
8421 | 168 | if (*out == NULL) goto failed; Branch (8421:13): [True: 0, False: 168]
|
8422 | 168 | return 0; |
8423 | 168 | } |
8424 | 255k | tp = state->IfExp_type; |
8425 | 255k | isinstance = PyObject_IsInstance(obj, tp); |
8426 | 255k | if (isinstance == -1) { Branch (8426:9): [True: 0, False: 255k]
|
8427 | 0 | return 1; |
8428 | 0 | } |
8429 | 255k | if (isinstance) { Branch (8429:9): [True: 238, False: 255k]
|
8430 | 238 | expr_ty test; |
8431 | 238 | expr_ty body; |
8432 | 238 | expr_ty orelse; |
8433 | | |
8434 | 238 | if (_PyObject_LookupAttr(obj, state->test, &tmp) < 0) { Branch (8434:13): [True: 0, False: 238]
|
8435 | 0 | return 1; |
8436 | 0 | } |
8437 | 238 | if (tmp == NULL) { Branch (8437:13): [True: 0, False: 238]
|
8438 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from IfExp"); |
8439 | 0 | return 1; |
8440 | 0 | } |
8441 | 238 | else { |
8442 | 238 | int res; |
8443 | 238 | if (_Py_EnterRecursiveCall(" while traversing 'IfExp' node")) { Branch (8443:17): [True: 0, False: 238]
|
8444 | 0 | goto failed; |
8445 | 0 | } |
8446 | 238 | res = obj2ast_expr(state, tmp, &test, arena); |
8447 | 238 | _Py_LeaveRecursiveCall(); |
8448 | 238 | if (res != 0) goto failed; Branch (8448:17): [True: 0, False: 238]
|
8449 | 238 | Py_CLEAR(tmp); Line | Count | Source | 587 | 238 | do { \ | 588 | 238 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 238 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 238 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 238 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 238, False: 0]
| 590 | 238 | (op) = NULL; \ | 591 | 238 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 238 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 238 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 238 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 238 | } \ | 593 | 238 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8450 | 238 | } |
8451 | 238 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (8451:13): [True: 0, False: 238]
|
8452 | 0 | return 1; |
8453 | 0 | } |
8454 | 238 | if (tmp == NULL) { Branch (8454:13): [True: 0, False: 238]
|
8455 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from IfExp"); |
8456 | 0 | return 1; |
8457 | 0 | } |
8458 | 238 | else { |
8459 | 238 | int res; |
8460 | 238 | if (_Py_EnterRecursiveCall(" while traversing 'IfExp' node")) { Branch (8460:17): [True: 0, False: 238]
|
8461 | 0 | goto failed; |
8462 | 0 | } |
8463 | 238 | res = obj2ast_expr(state, tmp, &body, arena); |
8464 | 238 | _Py_LeaveRecursiveCall(); |
8465 | 238 | if (res != 0) goto failed; Branch (8465:17): [True: 0, False: 238]
|
8466 | 238 | Py_CLEAR(tmp); Line | Count | Source | 587 | 238 | do { \ | 588 | 238 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 238 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 238 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 238 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 238, False: 0]
| 590 | 238 | (op) = NULL; \ | 591 | 238 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 238 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 238 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 238 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 238 | } \ | 593 | 238 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8467 | 238 | } |
8468 | 238 | if (_PyObject_LookupAttr(obj, state->orelse, &tmp) < 0) { Branch (8468:13): [True: 0, False: 238]
|
8469 | 0 | return 1; |
8470 | 0 | } |
8471 | 238 | if (tmp == NULL) { Branch (8471:13): [True: 0, False: 238]
|
8472 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from IfExp"); |
8473 | 0 | return 1; |
8474 | 0 | } |
8475 | 238 | else { |
8476 | 238 | int res; |
8477 | 238 | if (_Py_EnterRecursiveCall(" while traversing 'IfExp' node")) { Branch (8477:17): [True: 0, False: 238]
|
8478 | 0 | goto failed; |
8479 | 0 | } |
8480 | 238 | res = obj2ast_expr(state, tmp, &orelse, arena); |
8481 | 238 | _Py_LeaveRecursiveCall(); |
8482 | 238 | if (res != 0) goto failed; Branch (8482:17): [True: 0, False: 238]
|
8483 | 238 | Py_CLEAR(tmp); Line | Count | Source | 587 | 238 | do { \ | 588 | 238 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 238 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 238 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 238 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 238, False: 0]
| 590 | 238 | (op) = NULL; \ | 591 | 238 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 238 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 238 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 238 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 238 | } \ | 593 | 238 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8484 | 238 | } |
8485 | 238 | *out = _PyAST_IfExp(test, body, orelse, lineno, col_offset, end_lineno, |
8486 | 238 | end_col_offset, arena); |
8487 | 238 | if (*out == NULL) goto failed; Branch (8487:13): [True: 0, False: 238]
|
8488 | 238 | return 0; |
8489 | 238 | } |
8490 | 255k | tp = state->Dict_type; |
8491 | 255k | isinstance = PyObject_IsInstance(obj, tp); |
8492 | 255k | if (isinstance == -1) { Branch (8492:9): [True: 0, False: 255k]
|
8493 | 0 | return 1; |
8494 | 0 | } |
8495 | 255k | if (isinstance) { Branch (8495:9): [True: 625, False: 254k]
|
8496 | 625 | asdl_expr_seq* keys; |
8497 | 625 | asdl_expr_seq* values; |
8498 | | |
8499 | 625 | if (_PyObject_LookupAttr(obj, state->keys, &tmp) < 0) { Branch (8499:13): [True: 0, False: 625]
|
8500 | 0 | return 1; |
8501 | 0 | } |
8502 | 625 | if (tmp == NULL) { Branch (8502:13): [True: 0, False: 625]
|
8503 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"keys\" missing from Dict"); |
8504 | 0 | return 1; |
8505 | 0 | } |
8506 | 625 | else { |
8507 | 625 | int res; |
8508 | 625 | Py_ssize_t len; |
8509 | 625 | Py_ssize_t i; |
8510 | 625 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 625 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 625 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8510:17): [True: 0, False: 625]
|
8511 | 0 | PyErr_Format(PyExc_TypeError, "Dict field \"keys\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8512 | 0 | goto failed; |
8513 | 0 | } |
8514 | 625 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 625 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 625 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 625 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8515 | 625 | keys = _Py_asdl_expr_seq_new(len, arena); |
8516 | 625 | if (keys == NULL) goto failed; Branch (8516:17): [True: 0, False: 625]
|
8517 | 3.35k | for (i = 0; i < len; i++) { Branch (8517:25): [True: 2.72k, False: 625]
|
8518 | 2.72k | expr_ty val; |
8519 | 2.72k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 2.72k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 2.72k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8520 | 2.72k | Py_INCREF(tmp2); Line | Count | Source | 512 | 2.72k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8521 | 2.72k | if (_Py_EnterRecursiveCall(" while traversing 'Dict' node")) { Branch (8521:21): [True: 0, False: 2.72k]
|
8522 | 0 | goto failed; |
8523 | 0 | } |
8524 | 2.72k | res = obj2ast_expr(state, tmp2, &val, arena); |
8525 | 2.72k | _Py_LeaveRecursiveCall(); |
8526 | 2.72k | Py_DECREF(tmp2); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8527 | 2.72k | if (res != 0) goto failed; Branch (8527:21): [True: 0, False: 2.72k]
|
8528 | 2.72k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 2.72k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8528:21): [True: 0, False: 2.72k]
|
8529 | 0 | PyErr_SetString(PyExc_RuntimeError, "Dict field \"keys\" changed size during iteration"); |
8530 | 0 | goto failed; |
8531 | 0 | } |
8532 | 2.72k | asdl_seq_SET(keys, i, val); Line | Count | Source | 94 | 2.72k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 2.72k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8533 | 2.72k | } |
8534 | 625 | Py_CLEAR(tmp); Line | Count | Source | 587 | 625 | do { \ | 588 | 625 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 625 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 625 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 625 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 625, False: 0]
| 590 | 625 | (op) = NULL; \ | 591 | 625 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 625 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 625 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 625 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 625 | } \ | 593 | 625 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8535 | 625 | } |
8536 | 625 | if (_PyObject_LookupAttr(obj, state->values, &tmp) < 0) { Branch (8536:13): [True: 0, False: 625]
|
8537 | 0 | return 1; |
8538 | 0 | } |
8539 | 625 | if (tmp == NULL) { Branch (8539:13): [True: 0, False: 625]
|
8540 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from Dict"); |
8541 | 0 | return 1; |
8542 | 0 | } |
8543 | 625 | else { |
8544 | 625 | int res; |
8545 | 625 | Py_ssize_t len; |
8546 | 625 | Py_ssize_t i; |
8547 | 625 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 625 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 625 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8547:17): [True: 0, False: 625]
|
8548 | 0 | PyErr_Format(PyExc_TypeError, "Dict field \"values\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8549 | 0 | goto failed; |
8550 | 0 | } |
8551 | 625 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 625 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 625 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 625 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8552 | 625 | values = _Py_asdl_expr_seq_new(len, arena); |
8553 | 625 | if (values == NULL) goto failed; Branch (8553:17): [True: 0, False: 625]
|
8554 | 3.35k | for (i = 0; i < len; i++) { Branch (8554:25): [True: 2.72k, False: 625]
|
8555 | 2.72k | expr_ty val; |
8556 | 2.72k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 2.72k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 2.72k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8557 | 2.72k | Py_INCREF(tmp2); Line | Count | Source | 512 | 2.72k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8558 | 2.72k | if (_Py_EnterRecursiveCall(" while traversing 'Dict' node")) { Branch (8558:21): [True: 0, False: 2.72k]
|
8559 | 0 | goto failed; |
8560 | 0 | } |
8561 | 2.72k | res = obj2ast_expr(state, tmp2, &val, arena); |
8562 | 2.72k | _Py_LeaveRecursiveCall(); |
8563 | 2.72k | Py_DECREF(tmp2); Line | Count | Source | 548 | 2.72k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8564 | 2.72k | if (res != 0) goto failed; Branch (8564:21): [True: 0, False: 2.72k]
|
8565 | 2.72k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 2.72k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.72k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.72k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8565:21): [True: 0, False: 2.72k]
|
8566 | 0 | PyErr_SetString(PyExc_RuntimeError, "Dict field \"values\" changed size during iteration"); |
8567 | 0 | goto failed; |
8568 | 0 | } |
8569 | 2.72k | asdl_seq_SET(values, i, val); Line | Count | Source | 94 | 2.72k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 2.72k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8570 | 2.72k | } |
8571 | 625 | Py_CLEAR(tmp); Line | Count | Source | 587 | 625 | do { \ | 588 | 625 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 625 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 625 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 625 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 625, False: 0]
| 590 | 625 | (op) = NULL; \ | 591 | 625 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 625 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 625 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 625 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 625 | } \ | 593 | 625 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8572 | 625 | } |
8573 | 625 | *out = _PyAST_Dict(keys, values, lineno, col_offset, end_lineno, |
8574 | 625 | end_col_offset, arena); |
8575 | 625 | if (*out == NULL) goto failed; Branch (8575:13): [True: 0, False: 625]
|
8576 | 625 | return 0; |
8577 | 625 | } |
8578 | 254k | tp = state->Set_type; |
8579 | 254k | isinstance = PyObject_IsInstance(obj, tp); |
8580 | 254k | if (isinstance == -1) { Branch (8580:9): [True: 0, False: 254k]
|
8581 | 0 | return 1; |
8582 | 0 | } |
8583 | 254k | if (isinstance) { Branch (8583:9): [True: 114, False: 254k]
|
8584 | 114 | asdl_expr_seq* elts; |
8585 | | |
8586 | 114 | if (_PyObject_LookupAttr(obj, state->elts, &tmp) < 0) { Branch (8586:13): [True: 0, False: 114]
|
8587 | 0 | return 1; |
8588 | 0 | } |
8589 | 114 | if (tmp == NULL) { Branch (8589:13): [True: 0, False: 114]
|
8590 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from Set"); |
8591 | 0 | return 1; |
8592 | 0 | } |
8593 | 114 | else { |
8594 | 114 | int res; |
8595 | 114 | Py_ssize_t len; |
8596 | 114 | Py_ssize_t i; |
8597 | 114 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 114 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 114 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8597:17): [True: 0, False: 114]
|
8598 | 0 | PyErr_Format(PyExc_TypeError, "Set field \"elts\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8599 | 0 | goto failed; |
8600 | 0 | } |
8601 | 114 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 114 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 114 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 114 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8602 | 114 | elts = _Py_asdl_expr_seq_new(len, arena); |
8603 | 114 | if (elts == NULL) goto failed; Branch (8603:17): [True: 0, False: 114]
|
8604 | 411 | for (i = 0; i < len; i++) { Branch (8604:25): [True: 297, False: 114]
|
8605 | 297 | expr_ty val; |
8606 | 297 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 297 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 297 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 297 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8607 | 297 | Py_INCREF(tmp2); Line | Count | Source | 512 | 297 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 297 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 297 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8608 | 297 | if (_Py_EnterRecursiveCall(" while traversing 'Set' node")) { Branch (8608:21): [True: 0, False: 297]
|
8609 | 0 | goto failed; |
8610 | 0 | } |
8611 | 297 | res = obj2ast_expr(state, tmp2, &val, arena); |
8612 | 297 | _Py_LeaveRecursiveCall(); |
8613 | 297 | Py_DECREF(tmp2); Line | Count | Source | 548 | 297 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 297 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 297 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8614 | 297 | if (res != 0) goto failed; Branch (8614:21): [True: 0, False: 297]
|
8615 | 297 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 297 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 297 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 297 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8615:21): [True: 0, False: 297]
|
8616 | 0 | PyErr_SetString(PyExc_RuntimeError, "Set field \"elts\" changed size during iteration"); |
8617 | 0 | goto failed; |
8618 | 0 | } |
8619 | 297 | asdl_seq_SET(elts, i, val); Line | Count | Source | 94 | 297 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 297 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8620 | 297 | } |
8621 | 114 | Py_CLEAR(tmp); Line | Count | Source | 587 | 114 | do { \ | 588 | 114 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 114 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 114 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 114 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 114, False: 0]
| 590 | 114 | (op) = NULL; \ | 591 | 114 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 114 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 114 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 114 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 114 | } \ | 593 | 114 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8622 | 114 | } |
8623 | 114 | *out = _PyAST_Set(elts, lineno, col_offset, end_lineno, end_col_offset, |
8624 | 114 | arena); |
8625 | 114 | if (*out == NULL) goto failed; Branch (8625:13): [True: 0, False: 114]
|
8626 | 114 | return 0; |
8627 | 114 | } |
8628 | 254k | tp = state->ListComp_type; |
8629 | 254k | isinstance = PyObject_IsInstance(obj, tp); |
8630 | 254k | if (isinstance == -1) { Branch (8630:9): [True: 0, False: 254k]
|
8631 | 0 | return 1; |
8632 | 0 | } |
8633 | 254k | if (isinstance) { Branch (8633:9): [True: 320, False: 254k]
|
8634 | 320 | expr_ty elt; |
8635 | 320 | asdl_comprehension_seq* generators; |
8636 | | |
8637 | 320 | if (_PyObject_LookupAttr(obj, state->elt, &tmp) < 0) { Branch (8637:13): [True: 0, False: 320]
|
8638 | 0 | return 1; |
8639 | 0 | } |
8640 | 320 | if (tmp == NULL) { Branch (8640:13): [True: 0, False: 320]
|
8641 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from ListComp"); |
8642 | 0 | return 1; |
8643 | 0 | } |
8644 | 320 | else { |
8645 | 320 | int res; |
8646 | 320 | if (_Py_EnterRecursiveCall(" while traversing 'ListComp' node")) { Branch (8646:17): [True: 0, False: 320]
|
8647 | 0 | goto failed; |
8648 | 0 | } |
8649 | 320 | res = obj2ast_expr(state, tmp, &elt, arena); |
8650 | 320 | _Py_LeaveRecursiveCall(); |
8651 | 320 | if (res != 0) goto failed; Branch (8651:17): [True: 0, False: 320]
|
8652 | 320 | Py_CLEAR(tmp); Line | Count | Source | 587 | 320 | do { \ | 588 | 320 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 320 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 320 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 320 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 320, False: 0]
| 590 | 320 | (op) = NULL; \ | 591 | 320 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 320 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 320 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 320 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 320 | } \ | 593 | 320 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8653 | 320 | } |
8654 | 320 | if (_PyObject_LookupAttr(obj, state->generators, &tmp) < 0) { Branch (8654:13): [True: 0, False: 320]
|
8655 | 0 | return 1; |
8656 | 0 | } |
8657 | 320 | if (tmp == NULL) { Branch (8657:13): [True: 0, False: 320]
|
8658 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from ListComp"); |
8659 | 0 | return 1; |
8660 | 0 | } |
8661 | 320 | else { |
8662 | 320 | int res; |
8663 | 320 | Py_ssize_t len; |
8664 | 320 | Py_ssize_t i; |
8665 | 320 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 320 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 320 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8665:17): [True: 0, False: 320]
|
8666 | 0 | PyErr_Format(PyExc_TypeError, "ListComp field \"generators\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8667 | 0 | goto failed; |
8668 | 0 | } |
8669 | 320 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 320 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 320 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 320 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8670 | 320 | generators = _Py_asdl_comprehension_seq_new(len, arena); |
8671 | 320 | if (generators == NULL) goto failed; Branch (8671:17): [True: 0, False: 320]
|
8672 | 656 | for (i = 0; i < len; i++) { Branch (8672:25): [True: 336, False: 320]
|
8673 | 336 | comprehension_ty val; |
8674 | 336 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 336 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 336 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 336 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8675 | 336 | Py_INCREF(tmp2); Line | Count | Source | 512 | 336 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 336 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 336 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8676 | 336 | if (_Py_EnterRecursiveCall(" while traversing 'ListComp' node")) { Branch (8676:21): [True: 0, False: 336]
|
8677 | 0 | goto failed; |
8678 | 0 | } |
8679 | 336 | res = obj2ast_comprehension(state, tmp2, &val, arena); |
8680 | 336 | _Py_LeaveRecursiveCall(); |
8681 | 336 | Py_DECREF(tmp2); Line | Count | Source | 548 | 336 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 336 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 336 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8682 | 336 | if (res != 0) goto failed; Branch (8682:21): [True: 0, False: 336]
|
8683 | 336 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 336 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 336 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 336 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8683:21): [True: 0, False: 336]
|
8684 | 0 | PyErr_SetString(PyExc_RuntimeError, "ListComp field \"generators\" changed size during iteration"); |
8685 | 0 | goto failed; |
8686 | 0 | } |
8687 | 336 | asdl_seq_SET(generators, i, val); Line | Count | Source | 94 | 336 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 336 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8688 | 336 | } |
8689 | 320 | Py_CLEAR(tmp); Line | Count | Source | 587 | 320 | do { \ | 588 | 320 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 320 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 320 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 320 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 320, False: 0]
| 590 | 320 | (op) = NULL; \ | 591 | 320 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 320 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 320 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 320 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 320 | } \ | 593 | 320 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8690 | 320 | } |
8691 | 320 | *out = _PyAST_ListComp(elt, generators, lineno, col_offset, end_lineno, |
8692 | 320 | end_col_offset, arena); |
8693 | 320 | if (*out == NULL) goto failed; Branch (8693:13): [True: 0, False: 320]
|
8694 | 320 | return 0; |
8695 | 320 | } |
8696 | 254k | tp = state->SetComp_type; |
8697 | 254k | isinstance = PyObject_IsInstance(obj, tp); |
8698 | 254k | if (isinstance == -1) { Branch (8698:9): [True: 0, False: 254k]
|
8699 | 0 | return 1; |
8700 | 0 | } |
8701 | 254k | if (isinstance) { Branch (8701:9): [True: 23, False: 254k]
|
8702 | 23 | expr_ty elt; |
8703 | 23 | asdl_comprehension_seq* generators; |
8704 | | |
8705 | 23 | if (_PyObject_LookupAttr(obj, state->elt, &tmp) < 0) { Branch (8705:13): [True: 0, False: 23]
|
8706 | 0 | return 1; |
8707 | 0 | } |
8708 | 23 | if (tmp == NULL) { Branch (8708:13): [True: 0, False: 23]
|
8709 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from SetComp"); |
8710 | 0 | return 1; |
8711 | 0 | } |
8712 | 23 | else { |
8713 | 23 | int res; |
8714 | 23 | if (_Py_EnterRecursiveCall(" while traversing 'SetComp' node")) { Branch (8714:17): [True: 0, False: 23]
|
8715 | 0 | goto failed; |
8716 | 0 | } |
8717 | 23 | res = obj2ast_expr(state, tmp, &elt, arena); |
8718 | 23 | _Py_LeaveRecursiveCall(); |
8719 | 23 | if (res != 0) goto failed; Branch (8719:17): [True: 0, False: 23]
|
8720 | 23 | Py_CLEAR(tmp); Line | Count | Source | 587 | 23 | do { \ | 588 | 23 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 23 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 23 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 23 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 23, False: 0]
| 590 | 23 | (op) = NULL; \ | 591 | 23 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 23 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 23 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 23 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 23 | } \ | 593 | 23 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8721 | 23 | } |
8722 | 23 | if (_PyObject_LookupAttr(obj, state->generators, &tmp) < 0) { Branch (8722:13): [True: 0, False: 23]
|
8723 | 0 | return 1; |
8724 | 0 | } |
8725 | 23 | if (tmp == NULL) { Branch (8725:13): [True: 0, False: 23]
|
8726 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from SetComp"); |
8727 | 0 | return 1; |
8728 | 0 | } |
8729 | 23 | else { |
8730 | 23 | int res; |
8731 | 23 | Py_ssize_t len; |
8732 | 23 | Py_ssize_t i; |
8733 | 23 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 23 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 23 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8733:17): [True: 0, False: 23]
|
8734 | 0 | PyErr_Format(PyExc_TypeError, "SetComp field \"generators\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8735 | 0 | goto failed; |
8736 | 0 | } |
8737 | 23 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 23 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 23 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 23 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8738 | 23 | generators = _Py_asdl_comprehension_seq_new(len, arena); |
8739 | 23 | if (generators == NULL) goto failed; Branch (8739:17): [True: 0, False: 23]
|
8740 | 45 | for (i = 0; i < len; i++) { Branch (8740:25): [True: 22, False: 23]
|
8741 | 22 | comprehension_ty val; |
8742 | 22 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 22 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 22 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8743 | 22 | Py_INCREF(tmp2); Line | Count | Source | 512 | 22 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8744 | 22 | if (_Py_EnterRecursiveCall(" while traversing 'SetComp' node")) { Branch (8744:21): [True: 0, False: 22]
|
8745 | 0 | goto failed; |
8746 | 0 | } |
8747 | 22 | res = obj2ast_comprehension(state, tmp2, &val, arena); |
8748 | 22 | _Py_LeaveRecursiveCall(); |
8749 | 22 | Py_DECREF(tmp2); Line | Count | Source | 548 | 22 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8750 | 22 | if (res != 0) goto failed; Branch (8750:21): [True: 0, False: 22]
|
8751 | 22 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 22 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 22 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 22 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8751:21): [True: 0, False: 22]
|
8752 | 0 | PyErr_SetString(PyExc_RuntimeError, "SetComp field \"generators\" changed size during iteration"); |
8753 | 0 | goto failed; |
8754 | 0 | } |
8755 | 22 | asdl_seq_SET(generators, i, val); Line | Count | Source | 94 | 22 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 22 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8756 | 22 | } |
8757 | 23 | Py_CLEAR(tmp); Line | Count | Source | 587 | 23 | do { \ | 588 | 23 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 23 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 23 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 23 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 23, False: 0]
| 590 | 23 | (op) = NULL; \ | 591 | 23 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 23 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 23 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 23 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 23 | } \ | 593 | 23 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8758 | 23 | } |
8759 | 23 | *out = _PyAST_SetComp(elt, generators, lineno, col_offset, end_lineno, |
8760 | 23 | end_col_offset, arena); |
8761 | 23 | if (*out == NULL) goto failed; Branch (8761:13): [True: 0, False: 23]
|
8762 | 23 | return 0; |
8763 | 23 | } |
8764 | 254k | tp = state->DictComp_type; |
8765 | 254k | isinstance = PyObject_IsInstance(obj, tp); |
8766 | 254k | if (isinstance == -1) { Branch (8766:9): [True: 0, False: 254k]
|
8767 | 0 | return 1; |
8768 | 0 | } |
8769 | 254k | if (isinstance) { Branch (8769:9): [True: 37, False: 254k]
|
8770 | 37 | expr_ty key; |
8771 | 37 | expr_ty value; |
8772 | 37 | asdl_comprehension_seq* generators; |
8773 | | |
8774 | 37 | if (_PyObject_LookupAttr(obj, state->key, &tmp) < 0) { Branch (8774:13): [True: 0, False: 37]
|
8775 | 0 | return 1; |
8776 | 0 | } |
8777 | 37 | if (tmp == NULL) { Branch (8777:13): [True: 0, False: 37]
|
8778 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"key\" missing from DictComp"); |
8779 | 0 | return 1; |
8780 | 0 | } |
8781 | 37 | else { |
8782 | 37 | int res; |
8783 | 37 | if (_Py_EnterRecursiveCall(" while traversing 'DictComp' node")) { Branch (8783:17): [True: 0, False: 37]
|
8784 | 0 | goto failed; |
8785 | 0 | } |
8786 | 37 | res = obj2ast_expr(state, tmp, &key, arena); |
8787 | 37 | _Py_LeaveRecursiveCall(); |
8788 | 37 | if (res != 0) goto failed; Branch (8788:17): [True: 0, False: 37]
|
8789 | 37 | Py_CLEAR(tmp); Line | Count | Source | 587 | 37 | do { \ | 588 | 37 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 37 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 37, False: 0]
| 590 | 37 | (op) = NULL; \ | 591 | 37 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 37 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 37 | } \ | 593 | 37 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8790 | 37 | } |
8791 | 37 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (8791:13): [True: 0, False: 37]
|
8792 | 0 | return 1; |
8793 | 0 | } |
8794 | 37 | if (tmp == NULL) { Branch (8794:13): [True: 0, False: 37]
|
8795 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from DictComp"); |
8796 | 0 | return 1; |
8797 | 0 | } |
8798 | 37 | else { |
8799 | 37 | int res; |
8800 | 37 | if (_Py_EnterRecursiveCall(" while traversing 'DictComp' node")) { Branch (8800:17): [True: 0, False: 37]
|
8801 | 0 | goto failed; |
8802 | 0 | } |
8803 | 37 | res = obj2ast_expr(state, tmp, &value, arena); |
8804 | 37 | _Py_LeaveRecursiveCall(); |
8805 | 37 | if (res != 0) goto failed; Branch (8805:17): [True: 0, False: 37]
|
8806 | 37 | Py_CLEAR(tmp); Line | Count | Source | 587 | 37 | do { \ | 588 | 37 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 37 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 37, False: 0]
| 590 | 37 | (op) = NULL; \ | 591 | 37 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 37 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 37 | } \ | 593 | 37 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8807 | 37 | } |
8808 | 37 | if (_PyObject_LookupAttr(obj, state->generators, &tmp) < 0) { Branch (8808:13): [True: 0, False: 37]
|
8809 | 0 | return 1; |
8810 | 0 | } |
8811 | 37 | if (tmp == NULL) { Branch (8811:13): [True: 0, False: 37]
|
8812 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from DictComp"); |
8813 | 0 | return 1; |
8814 | 0 | } |
8815 | 37 | else { |
8816 | 37 | int res; |
8817 | 37 | Py_ssize_t len; |
8818 | 37 | Py_ssize_t i; |
8819 | 37 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 37 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 37 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8819:17): [True: 0, False: 37]
|
8820 | 0 | PyErr_Format(PyExc_TypeError, "DictComp field \"generators\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8821 | 0 | goto failed; |
8822 | 0 | } |
8823 | 37 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 37 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8824 | 37 | generators = _Py_asdl_comprehension_seq_new(len, arena); |
8825 | 37 | if (generators == NULL) goto failed; Branch (8825:17): [True: 0, False: 37]
|
8826 | 77 | for (i = 0; i < len; i++) { Branch (8826:25): [True: 40, False: 37]
|
8827 | 40 | comprehension_ty val; |
8828 | 40 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 40 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 40 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 40 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8829 | 40 | Py_INCREF(tmp2); Line | Count | Source | 512 | 40 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 40 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 40 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8830 | 40 | if (_Py_EnterRecursiveCall(" while traversing 'DictComp' node")) { Branch (8830:21): [True: 0, False: 40]
|
8831 | 0 | goto failed; |
8832 | 0 | } |
8833 | 40 | res = obj2ast_comprehension(state, tmp2, &val, arena); |
8834 | 40 | _Py_LeaveRecursiveCall(); |
8835 | 40 | Py_DECREF(tmp2); Line | Count | Source | 548 | 40 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 40 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 40 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8836 | 40 | if (res != 0) goto failed; Branch (8836:21): [True: 0, False: 40]
|
8837 | 40 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 40 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 40 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 40 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8837:21): [True: 0, False: 40]
|
8838 | 0 | PyErr_SetString(PyExc_RuntimeError, "DictComp field \"generators\" changed size during iteration"); |
8839 | 0 | goto failed; |
8840 | 0 | } |
8841 | 40 | asdl_seq_SET(generators, i, val); Line | Count | Source | 94 | 40 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 40 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8842 | 40 | } |
8843 | 37 | Py_CLEAR(tmp); Line | Count | Source | 587 | 37 | do { \ | 588 | 37 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 37 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 37, False: 0]
| 590 | 37 | (op) = NULL; \ | 591 | 37 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 37 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 37 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 37 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 37 | } \ | 593 | 37 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8844 | 37 | } |
8845 | 37 | *out = _PyAST_DictComp(key, value, generators, lineno, col_offset, |
8846 | 37 | end_lineno, end_col_offset, arena); |
8847 | 37 | if (*out == NULL) goto failed; Branch (8847:13): [True: 0, False: 37]
|
8848 | 37 | return 0; |
8849 | 37 | } |
8850 | 254k | tp = state->GeneratorExp_type; |
8851 | 254k | isinstance = PyObject_IsInstance(obj, tp); |
8852 | 254k | if (isinstance == -1) { Branch (8852:9): [True: 0, False: 254k]
|
8853 | 0 | return 1; |
8854 | 0 | } |
8855 | 254k | if (isinstance) { Branch (8855:9): [True: 232, False: 253k]
|
8856 | 232 | expr_ty elt; |
8857 | 232 | asdl_comprehension_seq* generators; |
8858 | | |
8859 | 232 | if (_PyObject_LookupAttr(obj, state->elt, &tmp) < 0) { Branch (8859:13): [True: 0, False: 232]
|
8860 | 0 | return 1; |
8861 | 0 | } |
8862 | 232 | if (tmp == NULL) { Branch (8862:13): [True: 0, False: 232]
|
8863 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from GeneratorExp"); |
8864 | 0 | return 1; |
8865 | 0 | } |
8866 | 232 | else { |
8867 | 232 | int res; |
8868 | 232 | if (_Py_EnterRecursiveCall(" while traversing 'GeneratorExp' node")) { Branch (8868:17): [True: 0, False: 232]
|
8869 | 0 | goto failed; |
8870 | 0 | } |
8871 | 232 | res = obj2ast_expr(state, tmp, &elt, arena); |
8872 | 232 | _Py_LeaveRecursiveCall(); |
8873 | 232 | if (res != 0) goto failed; Branch (8873:17): [True: 0, False: 232]
|
8874 | 232 | Py_CLEAR(tmp); Line | Count | Source | 587 | 232 | do { \ | 588 | 232 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 232 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 232 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 232 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 232, False: 0]
| 590 | 232 | (op) = NULL; \ | 591 | 232 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 232 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 232 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 232 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 232 | } \ | 593 | 232 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8875 | 232 | } |
8876 | 232 | if (_PyObject_LookupAttr(obj, state->generators, &tmp) < 0) { Branch (8876:13): [True: 0, False: 232]
|
8877 | 0 | return 1; |
8878 | 0 | } |
8879 | 232 | if (tmp == NULL) { Branch (8879:13): [True: 0, False: 232]
|
8880 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from GeneratorExp"); |
8881 | 0 | return 1; |
8882 | 0 | } |
8883 | 232 | else { |
8884 | 232 | int res; |
8885 | 232 | Py_ssize_t len; |
8886 | 232 | Py_ssize_t i; |
8887 | 232 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 232 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 232 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (8887:17): [True: 0, False: 232]
|
8888 | 0 | PyErr_Format(PyExc_TypeError, "GeneratorExp field \"generators\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8889 | 0 | goto failed; |
8890 | 0 | } |
8891 | 232 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 232 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 232 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 232 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8892 | 232 | generators = _Py_asdl_comprehension_seq_new(len, arena); |
8893 | 232 | if (generators == NULL) goto failed; Branch (8893:17): [True: 0, False: 232]
|
8894 | 469 | for (i = 0; i < len; i++) { Branch (8894:25): [True: 237, False: 232]
|
8895 | 237 | comprehension_ty val; |
8896 | 237 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 237 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 237 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 237 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8897 | 237 | Py_INCREF(tmp2); Line | Count | Source | 512 | 237 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 237 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 237 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8898 | 237 | if (_Py_EnterRecursiveCall(" while traversing 'GeneratorExp' node")) { Branch (8898:21): [True: 0, False: 237]
|
8899 | 0 | goto failed; |
8900 | 0 | } |
8901 | 237 | res = obj2ast_comprehension(state, tmp2, &val, arena); |
8902 | 237 | _Py_LeaveRecursiveCall(); |
8903 | 237 | Py_DECREF(tmp2); Line | Count | Source | 548 | 237 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 237 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 237 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
8904 | 237 | if (res != 0) goto failed; Branch (8904:21): [True: 0, False: 237]
|
8905 | 237 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 237 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 237 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 237 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (8905:21): [True: 0, False: 237]
|
8906 | 0 | PyErr_SetString(PyExc_RuntimeError, "GeneratorExp field \"generators\" changed size during iteration"); |
8907 | 0 | goto failed; |
8908 | 0 | } |
8909 | 237 | asdl_seq_SET(generators, i, val); Line | Count | Source | 94 | 237 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 237 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
8910 | 237 | } |
8911 | 232 | Py_CLEAR(tmp); Line | Count | Source | 587 | 232 | do { \ | 588 | 232 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 232 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 232 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 232 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 232, False: 0]
| 590 | 232 | (op) = NULL; \ | 591 | 232 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 232 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 232 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 232 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 232 | } \ | 593 | 232 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8912 | 232 | } |
8913 | 232 | *out = _PyAST_GeneratorExp(elt, generators, lineno, col_offset, |
8914 | 232 | end_lineno, end_col_offset, arena); |
8915 | 232 | if (*out == NULL) goto failed; Branch (8915:13): [True: 0, False: 232]
|
8916 | 232 | return 0; |
8917 | 232 | } |
8918 | 253k | tp = state->Await_type; |
8919 | 253k | isinstance = PyObject_IsInstance(obj, tp); |
8920 | 253k | if (isinstance == -1) { Branch (8920:9): [True: 0, False: 253k]
|
8921 | 0 | return 1; |
8922 | 0 | } |
8923 | 253k | if (isinstance) { Branch (8923:9): [True: 14, False: 253k]
|
8924 | 14 | expr_ty value; |
8925 | | |
8926 | 14 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (8926:13): [True: 0, False: 14]
|
8927 | 0 | return 1; |
8928 | 0 | } |
8929 | 14 | if (tmp == NULL) { Branch (8929:13): [True: 0, False: 14]
|
8930 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Await"); |
8931 | 0 | return 1; |
8932 | 0 | } |
8933 | 14 | else { |
8934 | 14 | int res; |
8935 | 14 | if (_Py_EnterRecursiveCall(" while traversing 'Await' node")) { Branch (8935:17): [True: 0, False: 14]
|
8936 | 0 | goto failed; |
8937 | 0 | } |
8938 | 14 | res = obj2ast_expr(state, tmp, &value, arena); |
8939 | 14 | _Py_LeaveRecursiveCall(); |
8940 | 14 | if (res != 0) goto failed; Branch (8940:17): [True: 0, False: 14]
|
8941 | 14 | Py_CLEAR(tmp); Line | Count | Source | 587 | 14 | do { \ | 588 | 14 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 14 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 14, False: 0]
| 590 | 14 | (op) = NULL; \ | 591 | 14 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 14 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 14 | } \ | 593 | 14 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8942 | 14 | } |
8943 | 14 | *out = _PyAST_Await(value, lineno, col_offset, end_lineno, |
8944 | 14 | end_col_offset, arena); |
8945 | 14 | if (*out == NULL) goto failed; Branch (8945:13): [True: 0, False: 14]
|
8946 | 14 | return 0; |
8947 | 14 | } |
8948 | 253k | tp = state->Yield_type; |
8949 | 253k | isinstance = PyObject_IsInstance(obj, tp); |
8950 | 253k | if (isinstance == -1) { Branch (8950:9): [True: 0, False: 253k]
|
8951 | 0 | return 1; |
8952 | 0 | } |
8953 | 253k | if (isinstance) { Branch (8953:9): [True: 210, False: 253k]
|
8954 | 210 | expr_ty value; |
8955 | | |
8956 | 210 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (8956:13): [True: 0, False: 210]
|
8957 | 0 | return 1; |
8958 | 0 | } |
8959 | 210 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 210 | #define Py_None (&_Py_NoneStruct) |
Branch (8959:13): [True: 0, False: 210]
Branch (8959:28): [True: 7, False: 203]
|
8960 | 7 | Py_CLEAR(tmp); Line | Count | Source | 587 | 7 | do { \ | 588 | 7 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7, False: 0]
| 590 | 7 | (op) = NULL; \ | 591 | 7 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7 | } \ | 593 | 7 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8961 | 7 | value = NULL; |
8962 | 7 | } |
8963 | 203 | else { |
8964 | 203 | int res; |
8965 | 203 | if (_Py_EnterRecursiveCall(" while traversing 'Yield' node")) { Branch (8965:17): [True: 0, False: 203]
|
8966 | 0 | goto failed; |
8967 | 0 | } |
8968 | 203 | res = obj2ast_expr(state, tmp, &value, arena); |
8969 | 203 | _Py_LeaveRecursiveCall(); |
8970 | 203 | if (res != 0) goto failed; Branch (8970:17): [True: 0, False: 203]
|
8971 | 203 | Py_CLEAR(tmp); Line | Count | Source | 587 | 203 | do { \ | 588 | 203 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 203 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 203 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 203 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 203, False: 0]
| 590 | 203 | (op) = NULL; \ | 591 | 203 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 203 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 203 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 203 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 203 | } \ | 593 | 203 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
8972 | 203 | } |
8973 | 210 | *out = _PyAST_Yield(value, lineno, col_offset, end_lineno, |
8974 | 210 | end_col_offset, arena); |
8975 | 210 | if (*out == NULL) goto failed; Branch (8975:13): [True: 0, False: 210]
|
8976 | 210 | return 0; |
8977 | 210 | } |
8978 | 253k | tp = state->YieldFrom_type; |
8979 | 253k | isinstance = PyObject_IsInstance(obj, tp); |
8980 | 253k | if (isinstance == -1) { Branch (8980:9): [True: 0, False: 253k]
|
8981 | 0 | return 1; |
8982 | 0 | } |
8983 | 253k | if (isinstance) { Branch (8983:9): [True: 52, False: 253k]
|
8984 | 52 | expr_ty value; |
8985 | | |
8986 | 52 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (8986:13): [True: 0, False: 52]
|
8987 | 0 | return 1; |
8988 | 0 | } |
8989 | 52 | if (tmp == NULL) { Branch (8989:13): [True: 0, False: 52]
|
8990 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from YieldFrom"); |
8991 | 0 | return 1; |
8992 | 0 | } |
8993 | 52 | else { |
8994 | 52 | int res; |
8995 | 52 | if (_Py_EnterRecursiveCall(" while traversing 'YieldFrom' node")) { Branch (8995:17): [True: 0, False: 52]
|
8996 | 0 | goto failed; |
8997 | 0 | } |
8998 | 52 | res = obj2ast_expr(state, tmp, &value, arena); |
8999 | 52 | _Py_LeaveRecursiveCall(); |
9000 | 52 | if (res != 0) goto failed; Branch (9000:17): [True: 0, False: 52]
|
9001 | 52 | Py_CLEAR(tmp); Line | Count | Source | 587 | 52 | do { \ | 588 | 52 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 52 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 52 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 52 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 52, False: 0]
| 590 | 52 | (op) = NULL; \ | 591 | 52 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 52 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 52 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 52 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 52 | } \ | 593 | 52 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9002 | 52 | } |
9003 | 52 | *out = _PyAST_YieldFrom(value, lineno, col_offset, end_lineno, |
9004 | 52 | end_col_offset, arena); |
9005 | 52 | if (*out == NULL) goto failed; Branch (9005:13): [True: 1, False: 51]
|
9006 | 51 | return 0; |
9007 | 52 | } |
9008 | 253k | tp = state->Compare_type; |
9009 | 253k | isinstance = PyObject_IsInstance(obj, tp); |
9010 | 253k | if (isinstance == -1) { Branch (9010:9): [True: 0, False: 253k]
|
9011 | 0 | return 1; |
9012 | 0 | } |
9013 | 253k | if (isinstance) { Branch (9013:9): [True: 8.17k, False: 245k]
|
9014 | 8.17k | expr_ty left; |
9015 | 8.17k | asdl_int_seq* ops; |
9016 | 8.17k | asdl_expr_seq* comparators; |
9017 | | |
9018 | 8.17k | if (_PyObject_LookupAttr(obj, state->left, &tmp) < 0) { Branch (9018:13): [True: 0, False: 8.17k]
|
9019 | 0 | return 1; |
9020 | 0 | } |
9021 | 8.17k | if (tmp == NULL) { Branch (9021:13): [True: 0, False: 8.17k]
|
9022 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"left\" missing from Compare"); |
9023 | 0 | return 1; |
9024 | 0 | } |
9025 | 8.17k | else { |
9026 | 8.17k | int res; |
9027 | 8.17k | if (_Py_EnterRecursiveCall(" while traversing 'Compare' node")) { Branch (9027:17): [True: 0, False: 8.17k]
|
9028 | 0 | goto failed; |
9029 | 0 | } |
9030 | 8.17k | res = obj2ast_expr(state, tmp, &left, arena); |
9031 | 8.17k | _Py_LeaveRecursiveCall(); |
9032 | 8.17k | if (res != 0) goto failed; Branch (9032:17): [True: 0, False: 8.17k]
|
9033 | 8.17k | Py_CLEAR(tmp); Line | Count | Source | 587 | 8.17k | do { \ | 588 | 8.17k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 8.17k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 8.17k, False: 0]
| 590 | 8.17k | (op) = NULL; \ | 591 | 8.17k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 8.17k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 8.17k | } \ | 593 | 8.17k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9034 | 8.17k | } |
9035 | 8.17k | if (_PyObject_LookupAttr(obj, state->ops, &tmp) < 0) { Branch (9035:13): [True: 0, False: 8.17k]
|
9036 | 0 | return 1; |
9037 | 0 | } |
9038 | 8.17k | if (tmp == NULL) { Branch (9038:13): [True: 0, False: 8.17k]
|
9039 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ops\" missing from Compare"); |
9040 | 0 | return 1; |
9041 | 0 | } |
9042 | 8.17k | else { |
9043 | 8.17k | int res; |
9044 | 8.17k | Py_ssize_t len; |
9045 | 8.17k | Py_ssize_t i; |
9046 | 8.17k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 8.17k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 8.17k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9046:17): [True: 0, False: 8.17k]
|
9047 | 0 | PyErr_Format(PyExc_TypeError, "Compare field \"ops\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9048 | 0 | goto failed; |
9049 | 0 | } |
9050 | 8.17k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 8.17k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9051 | 8.17k | ops = _Py_asdl_int_seq_new(len, arena); |
9052 | 8.17k | if (ops == NULL) goto failed; Branch (9052:17): [True: 0, False: 8.17k]
|
9053 | 16.4k | for (i = 0; i < len; i++) { Branch (9053:25): [True: 8.31k, False: 8.17k]
|
9054 | 8.31k | cmpop_ty val; |
9055 | 8.31k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 8.31k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 8.31k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9056 | 8.31k | Py_INCREF(tmp2); Line | Count | Source | 512 | 8.31k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9057 | 8.31k | if (_Py_EnterRecursiveCall(" while traversing 'Compare' node")) { Branch (9057:21): [True: 0, False: 8.31k]
|
9058 | 0 | goto failed; |
9059 | 0 | } |
9060 | 8.31k | res = obj2ast_cmpop(state, tmp2, &val, arena); |
9061 | 8.31k | _Py_LeaveRecursiveCall(); |
9062 | 8.31k | Py_DECREF(tmp2); Line | Count | Source | 548 | 8.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9063 | 8.31k | if (res != 0) goto failed; Branch (9063:21): [True: 0, False: 8.31k]
|
9064 | 8.31k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 8.31k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9064:21): [True: 0, False: 8.31k]
|
9065 | 0 | PyErr_SetString(PyExc_RuntimeError, "Compare field \"ops\" changed size during iteration"); |
9066 | 0 | goto failed; |
9067 | 0 | } |
9068 | 8.31k | asdl_seq_SET(ops, i, val); Line | Count | Source | 94 | 8.31k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 8.31k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9069 | 8.31k | } |
9070 | 8.17k | Py_CLEAR(tmp); Line | Count | Source | 587 | 8.17k | do { \ | 588 | 8.17k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 8.17k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 8.17k, False: 0]
| 590 | 8.17k | (op) = NULL; \ | 591 | 8.17k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 8.17k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 8.17k | } \ | 593 | 8.17k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9071 | 8.17k | } |
9072 | 8.17k | if (_PyObject_LookupAttr(obj, state->comparators, &tmp) < 0) { Branch (9072:13): [True: 0, False: 8.17k]
|
9073 | 0 | return 1; |
9074 | 0 | } |
9075 | 8.17k | if (tmp == NULL) { Branch (9075:13): [True: 0, False: 8.17k]
|
9076 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"comparators\" missing from Compare"); |
9077 | 0 | return 1; |
9078 | 0 | } |
9079 | 8.17k | else { |
9080 | 8.17k | int res; |
9081 | 8.17k | Py_ssize_t len; |
9082 | 8.17k | Py_ssize_t i; |
9083 | 8.17k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 8.17k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 8.17k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9083:17): [True: 0, False: 8.17k]
|
9084 | 0 | PyErr_Format(PyExc_TypeError, "Compare field \"comparators\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9085 | 0 | goto failed; |
9086 | 0 | } |
9087 | 8.17k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 8.17k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9088 | 8.17k | comparators = _Py_asdl_expr_seq_new(len, arena); |
9089 | 8.17k | if (comparators == NULL) goto failed; Branch (9089:17): [True: 0, False: 8.17k]
|
9090 | 16.4k | for (i = 0; i < len; i++) { Branch (9090:25): [True: 8.31k, False: 8.17k]
|
9091 | 8.31k | expr_ty val; |
9092 | 8.31k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 8.31k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 8.31k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9093 | 8.31k | Py_INCREF(tmp2); Line | Count | Source | 512 | 8.31k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9094 | 8.31k | if (_Py_EnterRecursiveCall(" while traversing 'Compare' node")) { Branch (9094:21): [True: 0, False: 8.31k]
|
9095 | 0 | goto failed; |
9096 | 0 | } |
9097 | 8.31k | res = obj2ast_expr(state, tmp2, &val, arena); |
9098 | 8.31k | _Py_LeaveRecursiveCall(); |
9099 | 8.31k | Py_DECREF(tmp2); Line | Count | Source | 548 | 8.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9100 | 8.31k | if (res != 0) goto failed; Branch (9100:21): [True: 0, False: 8.31k]
|
9101 | 8.31k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 8.31k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9101:21): [True: 0, False: 8.31k]
|
9102 | 0 | PyErr_SetString(PyExc_RuntimeError, "Compare field \"comparators\" changed size during iteration"); |
9103 | 0 | goto failed; |
9104 | 0 | } |
9105 | 8.31k | asdl_seq_SET(comparators, i, val); Line | Count | Source | 94 | 8.31k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 8.31k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9106 | 8.31k | } |
9107 | 8.17k | Py_CLEAR(tmp); Line | Count | Source | 587 | 8.17k | do { \ | 588 | 8.17k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 8.17k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 8.17k, False: 0]
| 590 | 8.17k | (op) = NULL; \ | 591 | 8.17k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 8.17k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 8.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 8.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 8.17k | } \ | 593 | 8.17k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9108 | 8.17k | } |
9109 | 8.17k | *out = _PyAST_Compare(left, ops, comparators, lineno, col_offset, |
9110 | 8.17k | end_lineno, end_col_offset, arena); |
9111 | 8.17k | if (*out == NULL) goto failed; Branch (9111:13): [True: 0, False: 8.17k]
|
9112 | 8.17k | return 0; |
9113 | 8.17k | } |
9114 | 245k | tp = state->Call_type; |
9115 | 245k | isinstance = PyObject_IsInstance(obj, tp); |
9116 | 245k | if (isinstance == -1) { Branch (9116:9): [True: 0, False: 245k]
|
9117 | 0 | return 1; |
9118 | 0 | } |
9119 | 245k | if (isinstance) { Branch (9119:9): [True: 30.1k, False: 215k]
|
9120 | 30.1k | expr_ty func; |
9121 | 30.1k | asdl_expr_seq* args; |
9122 | 30.1k | asdl_keyword_seq* keywords; |
9123 | | |
9124 | 30.1k | if (_PyObject_LookupAttr(obj, state->func, &tmp) < 0) { Branch (9124:13): [True: 0, False: 30.1k]
|
9125 | 0 | return 1; |
9126 | 0 | } |
9127 | 30.1k | if (tmp == NULL) { Branch (9127:13): [True: 0, False: 30.1k]
|
9128 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"func\" missing from Call"); |
9129 | 0 | return 1; |
9130 | 0 | } |
9131 | 30.1k | else { |
9132 | 30.1k | int res; |
9133 | 30.1k | if (_Py_EnterRecursiveCall(" while traversing 'Call' node")) { Branch (9133:17): [True: 0, False: 30.1k]
|
9134 | 0 | goto failed; |
9135 | 0 | } |
9136 | 30.1k | res = obj2ast_expr(state, tmp, &func, arena); |
9137 | 30.1k | _Py_LeaveRecursiveCall(); |
9138 | 30.1k | if (res != 0) goto failed; Branch (9138:17): [True: 0, False: 30.1k]
|
9139 | 30.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 30.1k | do { \ | 588 | 30.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 30.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 30.1k, False: 0]
| 590 | 30.1k | (op) = NULL; \ | 591 | 30.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 30.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 30.1k | } \ | 593 | 30.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9140 | 30.1k | } |
9141 | 30.1k | if (_PyObject_LookupAttr(obj, state->args, &tmp) < 0) { Branch (9141:13): [True: 0, False: 30.1k]
|
9142 | 0 | return 1; |
9143 | 0 | } |
9144 | 30.1k | if (tmp == NULL) { Branch (9144:13): [True: 0, False: 30.1k]
|
9145 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from Call"); |
9146 | 0 | return 1; |
9147 | 0 | } |
9148 | 30.1k | else { |
9149 | 30.1k | int res; |
9150 | 30.1k | Py_ssize_t len; |
9151 | 30.1k | Py_ssize_t i; |
9152 | 30.1k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 30.1k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 30.1k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9152:17): [True: 0, False: 30.1k]
|
9153 | 0 | PyErr_Format(PyExc_TypeError, "Call field \"args\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9154 | 0 | goto failed; |
9155 | 0 | } |
9156 | 30.1k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 30.1k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9157 | 30.1k | args = _Py_asdl_expr_seq_new(len, arena); |
9158 | 30.1k | if (args == NULL) goto failed; Branch (9158:17): [True: 0, False: 30.1k]
|
9159 | 67.0k | for (i = 0; i < len; i++) { Branch (9159:25): [True: 36.9k, False: 30.1k]
|
9160 | 36.9k | expr_ty val; |
9161 | 36.9k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 36.9k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 36.9k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 36.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9162 | 36.9k | Py_INCREF(tmp2); Line | Count | Source | 512 | 36.9k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 36.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9163 | 36.9k | if (_Py_EnterRecursiveCall(" while traversing 'Call' node")) { Branch (9163:21): [True: 0, False: 36.9k]
|
9164 | 0 | goto failed; |
9165 | 0 | } |
9166 | 36.9k | res = obj2ast_expr(state, tmp2, &val, arena); |
9167 | 36.9k | _Py_LeaveRecursiveCall(); |
9168 | 36.9k | Py_DECREF(tmp2); Line | Count | Source | 548 | 36.9k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 36.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9169 | 36.9k | if (res != 0) goto failed; Branch (9169:21): [True: 0, False: 36.9k]
|
9170 | 36.9k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 36.9k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 36.9k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 36.9k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9170:21): [True: 0, False: 36.9k]
|
9171 | 0 | PyErr_SetString(PyExc_RuntimeError, "Call field \"args\" changed size during iteration"); |
9172 | 0 | goto failed; |
9173 | 0 | } |
9174 | 36.9k | asdl_seq_SET(args, i, val); Line | Count | Source | 94 | 36.9k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 36.9k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9175 | 36.9k | } |
9176 | 30.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 30.1k | do { \ | 588 | 30.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 30.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 30.1k, False: 0]
| 590 | 30.1k | (op) = NULL; \ | 591 | 30.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 30.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 30.1k | } \ | 593 | 30.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9177 | 30.1k | } |
9178 | 30.1k | if (_PyObject_LookupAttr(obj, state->keywords, &tmp) < 0) { Branch (9178:13): [True: 0, False: 30.1k]
|
9179 | 0 | return 1; |
9180 | 0 | } |
9181 | 30.1k | if (tmp == NULL) { Branch (9181:13): [True: 0, False: 30.1k]
|
9182 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from Call"); |
9183 | 0 | return 1; |
9184 | 0 | } |
9185 | 30.1k | else { |
9186 | 30.1k | int res; |
9187 | 30.1k | Py_ssize_t len; |
9188 | 30.1k | Py_ssize_t i; |
9189 | 30.1k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 30.1k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 30.1k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9189:17): [True: 0, False: 30.1k]
|
9190 | 0 | PyErr_Format(PyExc_TypeError, "Call field \"keywords\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9191 | 0 | goto failed; |
9192 | 0 | } |
9193 | 30.1k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 30.1k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9194 | 30.1k | keywords = _Py_asdl_keyword_seq_new(len, arena); |
9195 | 30.1k | if (keywords == NULL) goto failed; Branch (9195:17): [True: 0, False: 30.1k]
|
9196 | 33.3k | for (i = 0; i < len; i++) { Branch (9196:25): [True: 3.26k, False: 30.1k]
|
9197 | 3.26k | keyword_ty val; |
9198 | 3.26k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 3.26k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 3.26k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 3.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9199 | 3.26k | Py_INCREF(tmp2); Line | Count | Source | 512 | 3.26k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9200 | 3.26k | if (_Py_EnterRecursiveCall(" while traversing 'Call' node")) { Branch (9200:21): [True: 0, False: 3.26k]
|
9201 | 0 | goto failed; |
9202 | 0 | } |
9203 | 3.26k | res = obj2ast_keyword(state, tmp2, &val, arena); |
9204 | 3.26k | _Py_LeaveRecursiveCall(); |
9205 | 3.26k | Py_DECREF(tmp2); Line | Count | Source | 548 | 3.26k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9206 | 3.26k | if (res != 0) goto failed; Branch (9206:21): [True: 0, False: 3.26k]
|
9207 | 3.26k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 3.26k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9207:21): [True: 0, False: 3.26k]
|
9208 | 0 | PyErr_SetString(PyExc_RuntimeError, "Call field \"keywords\" changed size during iteration"); |
9209 | 0 | goto failed; |
9210 | 0 | } |
9211 | 3.26k | asdl_seq_SET(keywords, i, val); Line | Count | Source | 94 | 3.26k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 3.26k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9212 | 3.26k | } |
9213 | 30.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 30.1k | do { \ | 588 | 30.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 30.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 30.1k, False: 0]
| 590 | 30.1k | (op) = NULL; \ | 591 | 30.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 30.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 30.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 30.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 30.1k | } \ | 593 | 30.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9214 | 30.1k | } |
9215 | 30.1k | *out = _PyAST_Call(func, args, keywords, lineno, col_offset, |
9216 | 30.1k | end_lineno, end_col_offset, arena); |
9217 | 30.1k | if (*out == NULL) goto failed; Branch (9217:13): [True: 0, False: 30.1k]
|
9218 | 30.1k | return 0; |
9219 | 30.1k | } |
9220 | 215k | tp = state->FormattedValue_type; |
9221 | 215k | isinstance = PyObject_IsInstance(obj, tp); |
9222 | 215k | if (isinstance == -1) { Branch (9222:9): [True: 0, False: 215k]
|
9223 | 0 | return 1; |
9224 | 0 | } |
9225 | 215k | if (isinstance) { Branch (9225:9): [True: 555, False: 214k]
|
9226 | 555 | expr_ty value; |
9227 | 555 | int conversion; |
9228 | 555 | expr_ty format_spec; |
9229 | | |
9230 | 555 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (9230:13): [True: 0, False: 555]
|
9231 | 0 | return 1; |
9232 | 0 | } |
9233 | 555 | if (tmp == NULL) { Branch (9233:13): [True: 0, False: 555]
|
9234 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from FormattedValue"); |
9235 | 0 | return 1; |
9236 | 0 | } |
9237 | 555 | else { |
9238 | 555 | int res; |
9239 | 555 | if (_Py_EnterRecursiveCall(" while traversing 'FormattedValue' node")) { Branch (9239:17): [True: 0, False: 555]
|
9240 | 0 | goto failed; |
9241 | 0 | } |
9242 | 555 | res = obj2ast_expr(state, tmp, &value, arena); |
9243 | 555 | _Py_LeaveRecursiveCall(); |
9244 | 555 | if (res != 0) goto failed; Branch (9244:17): [True: 0, False: 555]
|
9245 | 555 | Py_CLEAR(tmp); Line | Count | Source | 587 | 555 | do { \ | 588 | 555 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 555 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 555 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 555 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 555, False: 0]
| 590 | 555 | (op) = NULL; \ | 591 | 555 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 555 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 555 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 555 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 555 | } \ | 593 | 555 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9246 | 555 | } |
9247 | 555 | if (_PyObject_LookupAttr(obj, state->conversion, &tmp) < 0) { Branch (9247:13): [True: 0, False: 555]
|
9248 | 0 | return 1; |
9249 | 0 | } |
9250 | 555 | if (tmp == NULL) { Branch (9250:13): [True: 0, False: 555]
|
9251 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"conversion\" missing from FormattedValue"); |
9252 | 0 | return 1; |
9253 | 0 | } |
9254 | 555 | else { |
9255 | 555 | int res; |
9256 | 555 | if (_Py_EnterRecursiveCall(" while traversing 'FormattedValue' node")) { Branch (9256:17): [True: 0, False: 555]
|
9257 | 0 | goto failed; |
9258 | 0 | } |
9259 | 555 | res = obj2ast_int(state, tmp, &conversion, arena); |
9260 | 555 | _Py_LeaveRecursiveCall(); |
9261 | 555 | if (res != 0) goto failed; Branch (9261:17): [True: 0, False: 555]
|
9262 | 555 | Py_CLEAR(tmp); Line | Count | Source | 587 | 555 | do { \ | 588 | 555 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 555 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 555 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 555 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 555, False: 0]
| 590 | 555 | (op) = NULL; \ | 591 | 555 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 555 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 555 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 555 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 555 | } \ | 593 | 555 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9263 | 555 | } |
9264 | 555 | if (_PyObject_LookupAttr(obj, state->format_spec, &tmp) < 0) { Branch (9264:13): [True: 0, False: 555]
|
9265 | 0 | return 1; |
9266 | 0 | } |
9267 | 555 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 555 | #define Py_None (&_Py_NoneStruct) |
Branch (9267:13): [True: 0, False: 555]
Branch (9267:28): [True: 536, False: 19]
|
9268 | 536 | Py_CLEAR(tmp); Line | Count | Source | 587 | 536 | do { \ | 588 | 536 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 536 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 536 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 536 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 536, False: 0]
| 590 | 536 | (op) = NULL; \ | 591 | 536 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 536 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 536 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 536 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 536 | } \ | 593 | 536 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9269 | 536 | format_spec = NULL; |
9270 | 536 | } |
9271 | 19 | else { |
9272 | 19 | int res; |
9273 | 19 | if (_Py_EnterRecursiveCall(" while traversing 'FormattedValue' node")) { Branch (9273:17): [True: 0, False: 19]
|
9274 | 0 | goto failed; |
9275 | 0 | } |
9276 | 19 | res = obj2ast_expr(state, tmp, &format_spec, arena); |
9277 | 19 | _Py_LeaveRecursiveCall(); |
9278 | 19 | if (res != 0) goto failed; Branch (9278:17): [True: 0, False: 19]
|
9279 | 19 | Py_CLEAR(tmp); Line | Count | Source | 587 | 19 | do { \ | 588 | 19 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 19 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 19, False: 0]
| 590 | 19 | (op) = NULL; \ | 591 | 19 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 19 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 19 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 19 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 19 | } \ | 593 | 19 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9280 | 19 | } |
9281 | 555 | *out = _PyAST_FormattedValue(value, conversion, format_spec, lineno, |
9282 | 555 | col_offset, end_lineno, end_col_offset, |
9283 | 555 | arena); |
9284 | 555 | if (*out == NULL) goto failed; Branch (9284:13): [True: 0, False: 555]
|
9285 | 555 | return 0; |
9286 | 555 | } |
9287 | 214k | tp = state->JoinedStr_type; |
9288 | 214k | isinstance = PyObject_IsInstance(obj, tp); |
9289 | 214k | if (isinstance == -1) { Branch (9289:9): [True: 0, False: 214k]
|
9290 | 0 | return 1; |
9291 | 0 | } |
9292 | 214k | if (isinstance) { Branch (9292:9): [True: 391, False: 214k]
|
9293 | 391 | asdl_expr_seq* values; |
9294 | | |
9295 | 391 | if (_PyObject_LookupAttr(obj, state->values, &tmp) < 0) { Branch (9295:13): [True: 0, False: 391]
|
9296 | 0 | return 1; |
9297 | 0 | } |
9298 | 391 | if (tmp == NULL) { Branch (9298:13): [True: 0, False: 391]
|
9299 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from JoinedStr"); |
9300 | 0 | return 1; |
9301 | 0 | } |
9302 | 391 | else { |
9303 | 391 | int res; |
9304 | 391 | Py_ssize_t len; |
9305 | 391 | Py_ssize_t i; |
9306 | 391 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 391 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 391 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9306:17): [True: 0, False: 391]
|
9307 | 0 | PyErr_Format(PyExc_TypeError, "JoinedStr field \"values\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9308 | 0 | goto failed; |
9309 | 0 | } |
9310 | 391 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 391 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 391 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 391 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9311 | 391 | values = _Py_asdl_expr_seq_new(len, arena); |
9312 | 391 | if (values == NULL) goto failed; Branch (9312:17): [True: 0, False: 391]
|
9313 | 1.58k | for (i = 0; i < len; i++) { Branch (9313:25): [True: 1.19k, False: 391]
|
9314 | 1.19k | expr_ty val; |
9315 | 1.19k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 1.19k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 1.19k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 1.19k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9316 | 1.19k | Py_INCREF(tmp2); Line | Count | Source | 512 | 1.19k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.19k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.19k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9317 | 1.19k | if (_Py_EnterRecursiveCall(" while traversing 'JoinedStr' node")) { Branch (9317:21): [True: 0, False: 1.19k]
|
9318 | 0 | goto failed; |
9319 | 0 | } |
9320 | 1.19k | res = obj2ast_expr(state, tmp2, &val, arena); |
9321 | 1.19k | _Py_LeaveRecursiveCall(); |
9322 | 1.19k | Py_DECREF(tmp2); Line | Count | Source | 548 | 1.19k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.19k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.19k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9323 | 1.19k | if (res != 0) goto failed; Branch (9323:21): [True: 0, False: 1.19k]
|
9324 | 1.19k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 1.19k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.19k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.19k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9324:21): [True: 0, False: 1.19k]
|
9325 | 0 | PyErr_SetString(PyExc_RuntimeError, "JoinedStr field \"values\" changed size during iteration"); |
9326 | 0 | goto failed; |
9327 | 0 | } |
9328 | 1.19k | asdl_seq_SET(values, i, val); Line | Count | Source | 94 | 1.19k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 1.19k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9329 | 1.19k | } |
9330 | 391 | Py_CLEAR(tmp); Line | Count | Source | 587 | 391 | do { \ | 588 | 391 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 391 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 391 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 391 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 391, False: 0]
| 590 | 391 | (op) = NULL; \ | 591 | 391 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 391 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 391 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 391 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 391 | } \ | 593 | 391 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9331 | 391 | } |
9332 | 391 | *out = _PyAST_JoinedStr(values, lineno, col_offset, end_lineno, |
9333 | 391 | end_col_offset, arena); |
9334 | 391 | if (*out == NULL) goto failed; Branch (9334:13): [True: 0, False: 391]
|
9335 | 391 | return 0; |
9336 | 391 | } |
9337 | 214k | tp = state->Constant_type; |
9338 | 214k | isinstance = PyObject_IsInstance(obj, tp); |
9339 | 214k | if (isinstance == -1) { Branch (9339:9): [True: 0, False: 214k]
|
9340 | 0 | return 1; |
9341 | 0 | } |
9342 | 214k | if (isinstance) { Branch (9342:9): [True: 46.6k, False: 167k]
|
9343 | 46.6k | constant value; |
9344 | 46.6k | string kind; |
9345 | | |
9346 | 46.6k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (9346:13): [True: 0, False: 46.6k]
|
9347 | 0 | return 1; |
9348 | 0 | } |
9349 | 46.6k | if (tmp == NULL) { Branch (9349:13): [True: 0, False: 46.6k]
|
9350 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Constant"); |
9351 | 0 | return 1; |
9352 | 0 | } |
9353 | 46.6k | else { |
9354 | 46.6k | int res; |
9355 | 46.6k | if (_Py_EnterRecursiveCall(" while traversing 'Constant' node")) { Branch (9355:17): [True: 0, False: 46.6k]
|
9356 | 0 | goto failed; |
9357 | 0 | } |
9358 | 46.6k | res = obj2ast_constant(state, tmp, &value, arena); |
9359 | 46.6k | _Py_LeaveRecursiveCall(); |
9360 | 46.6k | if (res != 0) goto failed; Branch (9360:17): [True: 0, False: 46.6k]
|
9361 | 46.6k | Py_CLEAR(tmp); Line | Count | Source | 587 | 46.6k | do { \ | 588 | 46.6k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 46.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 46.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 46.6k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 46.6k, False: 0]
| 590 | 46.6k | (op) = NULL; \ | 591 | 46.6k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 46.6k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 46.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 46.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 46.6k | } \ | 593 | 46.6k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9362 | 46.6k | } |
9363 | 46.6k | if (_PyObject_LookupAttr(obj, state->kind, &tmp) < 0) { Branch (9363:13): [True: 0, False: 46.6k]
|
9364 | 0 | return 1; |
9365 | 0 | } |
9366 | 46.6k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 46.6k | #define Py_None (&_Py_NoneStruct) |
Branch (9366:13): [True: 0, False: 46.6k]
Branch (9366:28): [True: 46.6k, False: 0]
|
9367 | 46.6k | Py_CLEAR(tmp); Line | Count | Source | 587 | 46.6k | do { \ | 588 | 46.6k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 46.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 46.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 46.6k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 46.6k, False: 0]
| 590 | 46.6k | (op) = NULL; \ | 591 | 46.6k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 46.6k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 46.6k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 46.6k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 46.6k | } \ | 593 | 46.6k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9368 | 46.6k | kind = NULL; |
9369 | 46.6k | } |
9370 | 0 | else { |
9371 | 0 | int res; |
9372 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'Constant' node")) { Branch (9372:17): [True: 0, False: 0]
|
9373 | 0 | goto failed; |
9374 | 0 | } |
9375 | 0 | res = obj2ast_string(state, tmp, &kind, arena); |
9376 | 0 | _Py_LeaveRecursiveCall(); |
9377 | 0 | if (res != 0) goto failed; Branch (9377:17): [True: 0, False: 0]
|
9378 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9379 | 0 | } |
9380 | 46.6k | *out = _PyAST_Constant(value, kind, lineno, col_offset, end_lineno, |
9381 | 46.6k | end_col_offset, arena); |
9382 | 46.6k | if (*out == NULL) goto failed; Branch (9382:13): [True: 0, False: 46.6k]
|
9383 | 46.6k | return 0; |
9384 | 46.6k | } |
9385 | 167k | tp = state->Attribute_type; |
9386 | 167k | isinstance = PyObject_IsInstance(obj, tp); |
9387 | 167k | if (isinstance == -1) { Branch (9387:9): [True: 0, False: 167k]
|
9388 | 0 | return 1; |
9389 | 0 | } |
9390 | 167k | if (isinstance) { Branch (9390:9): [True: 35.1k, False: 132k]
|
9391 | 35.1k | expr_ty value; |
9392 | 35.1k | identifier attr; |
9393 | 35.1k | expr_context_ty ctx; |
9394 | | |
9395 | 35.1k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (9395:13): [True: 0, False: 35.1k]
|
9396 | 0 | return 1; |
9397 | 0 | } |
9398 | 35.1k | if (tmp == NULL) { Branch (9398:13): [True: 0, False: 35.1k]
|
9399 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Attribute"); |
9400 | 0 | return 1; |
9401 | 0 | } |
9402 | 35.1k | else { |
9403 | 35.1k | int res; |
9404 | 35.1k | if (_Py_EnterRecursiveCall(" while traversing 'Attribute' node")) { Branch (9404:17): [True: 0, False: 35.1k]
|
9405 | 0 | goto failed; |
9406 | 0 | } |
9407 | 35.1k | res = obj2ast_expr(state, tmp, &value, arena); |
9408 | 35.1k | _Py_LeaveRecursiveCall(); |
9409 | 35.1k | if (res != 0) goto failed; Branch (9409:17): [True: 0, False: 35.1k]
|
9410 | 35.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 35.1k | do { \ | 588 | 35.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 35.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 35.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 35.1k, False: 0]
| 590 | 35.1k | (op) = NULL; \ | 591 | 35.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 35.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 35.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 35.1k | } \ | 593 | 35.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9411 | 35.1k | } |
9412 | 35.1k | if (_PyObject_LookupAttr(obj, state->attr, &tmp) < 0) { Branch (9412:13): [True: 0, False: 35.1k]
|
9413 | 0 | return 1; |
9414 | 0 | } |
9415 | 35.1k | if (tmp == NULL) { Branch (9415:13): [True: 0, False: 35.1k]
|
9416 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"attr\" missing from Attribute"); |
9417 | 0 | return 1; |
9418 | 0 | } |
9419 | 35.1k | else { |
9420 | 35.1k | int res; |
9421 | 35.1k | if (_Py_EnterRecursiveCall(" while traversing 'Attribute' node")) { Branch (9421:17): [True: 0, False: 35.1k]
|
9422 | 0 | goto failed; |
9423 | 0 | } |
9424 | 35.1k | res = obj2ast_identifier(state, tmp, &attr, arena); |
9425 | 35.1k | _Py_LeaveRecursiveCall(); |
9426 | 35.1k | if (res != 0) goto failed; Branch (9426:17): [True: 0, False: 35.1k]
|
9427 | 35.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 35.1k | do { \ | 588 | 35.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 35.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 35.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 35.1k, False: 0]
| 590 | 35.1k | (op) = NULL; \ | 591 | 35.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 35.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 35.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 35.1k | } \ | 593 | 35.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9428 | 35.1k | } |
9429 | 35.1k | if (_PyObject_LookupAttr(obj, state->ctx, &tmp) < 0) { Branch (9429:13): [True: 0, False: 35.1k]
|
9430 | 0 | return 1; |
9431 | 0 | } |
9432 | 35.1k | if (tmp == NULL) { Branch (9432:13): [True: 0, False: 35.1k]
|
9433 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Attribute"); |
9434 | 0 | return 1; |
9435 | 0 | } |
9436 | 35.1k | else { |
9437 | 35.1k | int res; |
9438 | 35.1k | if (_Py_EnterRecursiveCall(" while traversing 'Attribute' node")) { Branch (9438:17): [True: 0, False: 35.1k]
|
9439 | 0 | goto failed; |
9440 | 0 | } |
9441 | 35.1k | res = obj2ast_expr_context(state, tmp, &ctx, arena); |
9442 | 35.1k | _Py_LeaveRecursiveCall(); |
9443 | 35.1k | if (res != 0) goto failed; Branch (9443:17): [True: 0, False: 35.1k]
|
9444 | 35.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 35.1k | do { \ | 588 | 35.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 35.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 35.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 35.1k, False: 0]
| 590 | 35.1k | (op) = NULL; \ | 591 | 35.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 35.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 35.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 35.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 35.1k | } \ | 593 | 35.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9445 | 35.1k | } |
9446 | 35.1k | *out = _PyAST_Attribute(value, attr, ctx, lineno, col_offset, |
9447 | 35.1k | end_lineno, end_col_offset, arena); |
9448 | 35.1k | if (*out == NULL) goto failed; Branch (9448:13): [True: 0, False: 35.1k]
|
9449 | 35.1k | return 0; |
9450 | 35.1k | } |
9451 | 132k | tp = state->Subscript_type; |
9452 | 132k | isinstance = PyObject_IsInstance(obj, tp); |
9453 | 132k | if (isinstance == -1) { Branch (9453:9): [True: 0, False: 132k]
|
9454 | 0 | return 1; |
9455 | 0 | } |
9456 | 132k | if (isinstance) { Branch (9456:9): [True: 4.94k, False: 127k]
|
9457 | 4.94k | expr_ty value; |
9458 | 4.94k | expr_ty slice; |
9459 | 4.94k | expr_context_ty ctx; |
9460 | | |
9461 | 4.94k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (9461:13): [True: 0, False: 4.94k]
|
9462 | 0 | return 1; |
9463 | 0 | } |
9464 | 4.94k | if (tmp == NULL) { Branch (9464:13): [True: 0, False: 4.94k]
|
9465 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Subscript"); |
9466 | 0 | return 1; |
9467 | 0 | } |
9468 | 4.94k | else { |
9469 | 4.94k | int res; |
9470 | 4.94k | if (_Py_EnterRecursiveCall(" while traversing 'Subscript' node")) { Branch (9470:17): [True: 0, False: 4.94k]
|
9471 | 0 | goto failed; |
9472 | 0 | } |
9473 | 4.94k | res = obj2ast_expr(state, tmp, &value, arena); |
9474 | 4.94k | _Py_LeaveRecursiveCall(); |
9475 | 4.94k | if (res != 0) goto failed; Branch (9475:17): [True: 0, False: 4.94k]
|
9476 | 4.94k | Py_CLEAR(tmp); Line | Count | Source | 587 | 4.94k | do { \ | 588 | 4.94k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4.94k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.94k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4.94k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4.94k, False: 0]
| 590 | 4.94k | (op) = NULL; \ | 591 | 4.94k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4.94k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.94k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.94k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4.94k | } \ | 593 | 4.94k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9477 | 4.94k | } |
9478 | 4.94k | if (_PyObject_LookupAttr(obj, state->slice, &tmp) < 0) { Branch (9478:13): [True: 0, False: 4.94k]
|
9479 | 0 | return 1; |
9480 | 0 | } |
9481 | 4.94k | if (tmp == NULL) { Branch (9481:13): [True: 0, False: 4.94k]
|
9482 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"slice\" missing from Subscript"); |
9483 | 0 | return 1; |
9484 | 0 | } |
9485 | 4.94k | else { |
9486 | 4.94k | int res; |
9487 | 4.94k | if (_Py_EnterRecursiveCall(" while traversing 'Subscript' node")) { Branch (9487:17): [True: 0, False: 4.94k]
|
9488 | 0 | goto failed; |
9489 | 0 | } |
9490 | 4.94k | res = obj2ast_expr(state, tmp, &slice, arena); |
9491 | 4.94k | _Py_LeaveRecursiveCall(); |
9492 | 4.94k | if (res != 0) goto failed; Branch (9492:17): [True: 0, False: 4.94k]
|
9493 | 4.94k | Py_CLEAR(tmp); Line | Count | Source | 587 | 4.94k | do { \ | 588 | 4.94k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4.94k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.94k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4.94k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4.94k, False: 0]
| 590 | 4.94k | (op) = NULL; \ | 591 | 4.94k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4.94k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.94k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.94k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4.94k | } \ | 593 | 4.94k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9494 | 4.94k | } |
9495 | 4.94k | if (_PyObject_LookupAttr(obj, state->ctx, &tmp) < 0) { Branch (9495:13): [True: 0, False: 4.94k]
|
9496 | 0 | return 1; |
9497 | 0 | } |
9498 | 4.94k | if (tmp == NULL) { Branch (9498:13): [True: 0, False: 4.94k]
|
9499 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Subscript"); |
9500 | 0 | return 1; |
9501 | 0 | } |
9502 | 4.94k | else { |
9503 | 4.94k | int res; |
9504 | 4.94k | if (_Py_EnterRecursiveCall(" while traversing 'Subscript' node")) { Branch (9504:17): [True: 0, False: 4.94k]
|
9505 | 0 | goto failed; |
9506 | 0 | } |
9507 | 4.94k | res = obj2ast_expr_context(state, tmp, &ctx, arena); |
9508 | 4.94k | _Py_LeaveRecursiveCall(); |
9509 | 4.94k | if (res != 0) goto failed; Branch (9509:17): [True: 0, False: 4.94k]
|
9510 | 4.94k | Py_CLEAR(tmp); Line | Count | Source | 587 | 4.94k | do { \ | 588 | 4.94k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4.94k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.94k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4.94k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4.94k, False: 0]
| 590 | 4.94k | (op) = NULL; \ | 591 | 4.94k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4.94k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4.94k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4.94k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4.94k | } \ | 593 | 4.94k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9511 | 4.94k | } |
9512 | 4.94k | *out = _PyAST_Subscript(value, slice, ctx, lineno, col_offset, |
9513 | 4.94k | end_lineno, end_col_offset, arena); |
9514 | 4.94k | if (*out == NULL) goto failed; Branch (9514:13): [True: 0, False: 4.94k]
|
9515 | 4.94k | return 0; |
9516 | 4.94k | } |
9517 | 127k | tp = state->Starred_type; |
9518 | 127k | isinstance = PyObject_IsInstance(obj, tp); |
9519 | 127k | if (isinstance == -1) { Branch (9519:9): [True: 0, False: 127k]
|
9520 | 0 | return 1; |
9521 | 0 | } |
9522 | 127k | if (isinstance) { Branch (9522:9): [True: 315, False: 127k]
|
9523 | 315 | expr_ty value; |
9524 | 315 | expr_context_ty ctx; |
9525 | | |
9526 | 315 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (9526:13): [True: 0, False: 315]
|
9527 | 0 | return 1; |
9528 | 0 | } |
9529 | 315 | if (tmp == NULL) { Branch (9529:13): [True: 0, False: 315]
|
9530 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Starred"); |
9531 | 0 | return 1; |
9532 | 0 | } |
9533 | 315 | else { |
9534 | 315 | int res; |
9535 | 315 | if (_Py_EnterRecursiveCall(" while traversing 'Starred' node")) { Branch (9535:17): [True: 0, False: 315]
|
9536 | 0 | goto failed; |
9537 | 0 | } |
9538 | 315 | res = obj2ast_expr(state, tmp, &value, arena); |
9539 | 315 | _Py_LeaveRecursiveCall(); |
9540 | 315 | if (res != 0) goto failed; Branch (9540:17): [True: 0, False: 315]
|
9541 | 315 | Py_CLEAR(tmp); Line | Count | Source | 587 | 315 | do { \ | 588 | 315 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 315 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 315 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 315 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 315, False: 0]
| 590 | 315 | (op) = NULL; \ | 591 | 315 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 315 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 315 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 315 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 315 | } \ | 593 | 315 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9542 | 315 | } |
9543 | 315 | if (_PyObject_LookupAttr(obj, state->ctx, &tmp) < 0) { Branch (9543:13): [True: 0, False: 315]
|
9544 | 0 | return 1; |
9545 | 0 | } |
9546 | 315 | if (tmp == NULL) { Branch (9546:13): [True: 0, False: 315]
|
9547 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Starred"); |
9548 | 0 | return 1; |
9549 | 0 | } |
9550 | 315 | else { |
9551 | 315 | int res; |
9552 | 315 | if (_Py_EnterRecursiveCall(" while traversing 'Starred' node")) { Branch (9552:17): [True: 0, False: 315]
|
9553 | 0 | goto failed; |
9554 | 0 | } |
9555 | 315 | res = obj2ast_expr_context(state, tmp, &ctx, arena); |
9556 | 315 | _Py_LeaveRecursiveCall(); |
9557 | 315 | if (res != 0) goto failed; Branch (9557:17): [True: 0, False: 315]
|
9558 | 315 | Py_CLEAR(tmp); Line | Count | Source | 587 | 315 | do { \ | 588 | 315 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 315 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 315 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 315 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 315, False: 0]
| 590 | 315 | (op) = NULL; \ | 591 | 315 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 315 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 315 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 315 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 315 | } \ | 593 | 315 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9559 | 315 | } |
9560 | 315 | *out = _PyAST_Starred(value, ctx, lineno, col_offset, end_lineno, |
9561 | 315 | end_col_offset, arena); |
9562 | 315 | if (*out == NULL) goto failed; Branch (9562:13): [True: 0, False: 315]
|
9563 | 315 | return 0; |
9564 | 315 | } |
9565 | 127k | tp = state->Name_type; |
9566 | 127k | isinstance = PyObject_IsInstance(obj, tp); |
9567 | 127k | if (isinstance == -1) { Branch (9567:9): [True: 0, False: 127k]
|
9568 | 0 | return 1; |
9569 | 0 | } |
9570 | 127k | if (isinstance) { Branch (9570:9): [True: 119k, False: 8.03k]
|
9571 | 119k | identifier id; |
9572 | 119k | expr_context_ty ctx; |
9573 | | |
9574 | 119k | if (_PyObject_LookupAttr(obj, state->id, &tmp) < 0) { Branch (9574:13): [True: 0, False: 119k]
|
9575 | 0 | return 1; |
9576 | 0 | } |
9577 | 119k | if (tmp == NULL) { Branch (9577:13): [True: 0, False: 119k]
|
9578 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"id\" missing from Name"); |
9579 | 0 | return 1; |
9580 | 0 | } |
9581 | 119k | else { |
9582 | 119k | int res; |
9583 | 119k | if (_Py_EnterRecursiveCall(" while traversing 'Name' node")) { Branch (9583:17): [True: 0, False: 119k]
|
9584 | 0 | goto failed; |
9585 | 0 | } |
9586 | 119k | res = obj2ast_identifier(state, tmp, &id, arena); |
9587 | 119k | _Py_LeaveRecursiveCall(); |
9588 | 119k | if (res != 0) goto failed; Branch (9588:17): [True: 1, False: 119k]
|
9589 | 119k | Py_CLEAR(tmp); Line | Count | Source | 587 | 119k | do { \ | 588 | 119k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 119k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 119k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 119k, False: 0]
| 590 | 119k | (op) = NULL; \ | 591 | 119k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 119k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 119k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 119k | } \ | 593 | 119k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9590 | 119k | } |
9591 | 119k | if (_PyObject_LookupAttr(obj, state->ctx, &tmp) < 0) { Branch (9591:13): [True: 0, False: 119k]
|
9592 | 0 | return 1; |
9593 | 0 | } |
9594 | 119k | if (tmp == NULL) { Branch (9594:13): [True: 0, False: 119k]
|
9595 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Name"); |
9596 | 0 | return 1; |
9597 | 0 | } |
9598 | 119k | else { |
9599 | 119k | int res; |
9600 | 119k | if (_Py_EnterRecursiveCall(" while traversing 'Name' node")) { Branch (9600:17): [True: 0, False: 119k]
|
9601 | 0 | goto failed; |
9602 | 0 | } |
9603 | 119k | res = obj2ast_expr_context(state, tmp, &ctx, arena); |
9604 | 119k | _Py_LeaveRecursiveCall(); |
9605 | 119k | if (res != 0) goto failed; Branch (9605:17): [True: 0, False: 119k]
|
9606 | 119k | Py_CLEAR(tmp); Line | Count | Source | 587 | 119k | do { \ | 588 | 119k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 119k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 119k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 119k, False: 0]
| 590 | 119k | (op) = NULL; \ | 591 | 119k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 119k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 119k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 119k | } \ | 593 | 119k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9607 | 119k | } |
9608 | 119k | *out = _PyAST_Name(id, ctx, lineno, col_offset, end_lineno, |
9609 | 119k | end_col_offset, arena); |
9610 | 119k | if (*out == NULL) goto failed; Branch (9610:13): [True: 0, False: 119k]
|
9611 | 119k | return 0; |
9612 | 119k | } |
9613 | 8.03k | tp = state->List_type; |
9614 | 8.03k | isinstance = PyObject_IsInstance(obj, tp); |
9615 | 8.03k | if (isinstance == -1) { Branch (9615:9): [True: 0, False: 8.03k]
|
9616 | 0 | return 1; |
9617 | 0 | } |
9618 | 8.03k | if (isinstance) { Branch (9618:9): [True: 1.48k, False: 6.54k]
|
9619 | 1.48k | asdl_expr_seq* elts; |
9620 | 1.48k | expr_context_ty ctx; |
9621 | | |
9622 | 1.48k | if (_PyObject_LookupAttr(obj, state->elts, &tmp) < 0) { Branch (9622:13): [True: 0, False: 1.48k]
|
9623 | 0 | return 1; |
9624 | 0 | } |
9625 | 1.48k | if (tmp == NULL) { Branch (9625:13): [True: 0, False: 1.48k]
|
9626 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from List"); |
9627 | 0 | return 1; |
9628 | 0 | } |
9629 | 1.48k | else { |
9630 | 1.48k | int res; |
9631 | 1.48k | Py_ssize_t len; |
9632 | 1.48k | Py_ssize_t i; |
9633 | 1.48k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.48k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.48k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9633:17): [True: 0, False: 1.48k]
|
9634 | 0 | PyErr_Format(PyExc_TypeError, "List field \"elts\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9635 | 0 | goto failed; |
9636 | 0 | } |
9637 | 1.48k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.48k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9638 | 1.48k | elts = _Py_asdl_expr_seq_new(len, arena); |
9639 | 1.48k | if (elts == NULL) goto failed; Branch (9639:17): [True: 0, False: 1.48k]
|
9640 | 4.94k | for (i = 0; i < len; i++) { Branch (9640:25): [True: 3.45k, False: 1.48k]
|
9641 | 3.45k | expr_ty val; |
9642 | 3.45k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 3.45k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 3.45k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 3.45k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9643 | 3.45k | Py_INCREF(tmp2); Line | Count | Source | 512 | 3.45k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.45k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.45k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9644 | 3.45k | if (_Py_EnterRecursiveCall(" while traversing 'List' node")) { Branch (9644:21): [True: 0, False: 3.45k]
|
9645 | 0 | goto failed; |
9646 | 0 | } |
9647 | 3.45k | res = obj2ast_expr(state, tmp2, &val, arena); |
9648 | 3.45k | _Py_LeaveRecursiveCall(); |
9649 | 3.45k | Py_DECREF(tmp2); Line | Count | Source | 548 | 3.45k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.45k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.45k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9650 | 3.45k | if (res != 0) goto failed; Branch (9650:21): [True: 0, False: 3.45k]
|
9651 | 3.45k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 3.45k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.45k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.45k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9651:21): [True: 0, False: 3.45k]
|
9652 | 0 | PyErr_SetString(PyExc_RuntimeError, "List field \"elts\" changed size during iteration"); |
9653 | 0 | goto failed; |
9654 | 0 | } |
9655 | 3.45k | asdl_seq_SET(elts, i, val); Line | Count | Source | 94 | 3.45k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 3.45k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9656 | 3.45k | } |
9657 | 1.48k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.48k | do { \ | 588 | 1.48k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.48k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.48k, False: 0]
| 590 | 1.48k | (op) = NULL; \ | 591 | 1.48k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.48k | } \ | 593 | 1.48k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9658 | 1.48k | } |
9659 | 1.48k | if (_PyObject_LookupAttr(obj, state->ctx, &tmp) < 0) { Branch (9659:13): [True: 0, False: 1.48k]
|
9660 | 0 | return 1; |
9661 | 0 | } |
9662 | 1.48k | if (tmp == NULL) { Branch (9662:13): [True: 0, False: 1.48k]
|
9663 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from List"); |
9664 | 0 | return 1; |
9665 | 0 | } |
9666 | 1.48k | else { |
9667 | 1.48k | int res; |
9668 | 1.48k | if (_Py_EnterRecursiveCall(" while traversing 'List' node")) { Branch (9668:17): [True: 0, False: 1.48k]
|
9669 | 0 | goto failed; |
9670 | 0 | } |
9671 | 1.48k | res = obj2ast_expr_context(state, tmp, &ctx, arena); |
9672 | 1.48k | _Py_LeaveRecursiveCall(); |
9673 | 1.48k | if (res != 0) goto failed; Branch (9673:17): [True: 0, False: 1.48k]
|
9674 | 1.48k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.48k | do { \ | 588 | 1.48k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.48k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.48k, False: 0]
| 590 | 1.48k | (op) = NULL; \ | 591 | 1.48k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.48k | } \ | 593 | 1.48k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9675 | 1.48k | } |
9676 | 1.48k | *out = _PyAST_List(elts, ctx, lineno, col_offset, end_lineno, |
9677 | 1.48k | end_col_offset, arena); |
9678 | 1.48k | if (*out == NULL) goto failed; Branch (9678:13): [True: 0, False: 1.48k]
|
9679 | 1.48k | return 0; |
9680 | 1.48k | } |
9681 | 6.54k | tp = state->Tuple_type; |
9682 | 6.54k | isinstance = PyObject_IsInstance(obj, tp); |
9683 | 6.54k | if (isinstance == -1) { Branch (9683:9): [True: 0, False: 6.54k]
|
9684 | 0 | return 1; |
9685 | 0 | } |
9686 | 6.54k | if (isinstance) { Branch (9686:9): [True: 5.24k, False: 1.29k]
|
9687 | 5.24k | asdl_expr_seq* elts; |
9688 | 5.24k | expr_context_ty ctx; |
9689 | | |
9690 | 5.24k | if (_PyObject_LookupAttr(obj, state->elts, &tmp) < 0) { Branch (9690:13): [True: 0, False: 5.24k]
|
9691 | 0 | return 1; |
9692 | 0 | } |
9693 | 5.24k | if (tmp == NULL) { Branch (9693:13): [True: 0, False: 5.24k]
|
9694 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from Tuple"); |
9695 | 0 | return 1; |
9696 | 0 | } |
9697 | 5.24k | else { |
9698 | 5.24k | int res; |
9699 | 5.24k | Py_ssize_t len; |
9700 | 5.24k | Py_ssize_t i; |
9701 | 5.24k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 5.24k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 5.24k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (9701:17): [True: 0, False: 5.24k]
|
9702 | 0 | PyErr_Format(PyExc_TypeError, "Tuple field \"elts\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9703 | 0 | goto failed; |
9704 | 0 | } |
9705 | 5.24k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 5.24k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9706 | 5.24k | elts = _Py_asdl_expr_seq_new(len, arena); |
9707 | 5.24k | if (elts == NULL) goto failed; Branch (9707:17): [True: 0, False: 5.24k]
|
9708 | 17.5k | for (i = 0; i < len; i++) { Branch (9708:25): [True: 12.3k, False: 5.24k]
|
9709 | 12.3k | expr_ty val; |
9710 | 12.3k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 12.3k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 12.3k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9711 | 12.3k | Py_INCREF(tmp2); Line | Count | Source | 512 | 12.3k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9712 | 12.3k | if (_Py_EnterRecursiveCall(" while traversing 'Tuple' node")) { Branch (9712:21): [True: 0, False: 12.3k]
|
9713 | 0 | goto failed; |
9714 | 0 | } |
9715 | 12.3k | res = obj2ast_expr(state, tmp2, &val, arena); |
9716 | 12.3k | _Py_LeaveRecursiveCall(); |
9717 | 12.3k | Py_DECREF(tmp2); Line | Count | Source | 548 | 12.3k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9718 | 12.3k | if (res != 0) goto failed; Branch (9718:21): [True: 0, False: 12.3k]
|
9719 | 12.3k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 12.3k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 12.3k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 12.3k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (9719:21): [True: 0, False: 12.3k]
|
9720 | 0 | PyErr_SetString(PyExc_RuntimeError, "Tuple field \"elts\" changed size during iteration"); |
9721 | 0 | goto failed; |
9722 | 0 | } |
9723 | 12.3k | asdl_seq_SET(elts, i, val); Line | Count | Source | 94 | 12.3k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 12.3k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
9724 | 12.3k | } |
9725 | 5.24k | Py_CLEAR(tmp); Line | Count | Source | 587 | 5.24k | do { \ | 588 | 5.24k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 5.24k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 5.24k, False: 0]
| 590 | 5.24k | (op) = NULL; \ | 591 | 5.24k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 5.24k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 5.24k | } \ | 593 | 5.24k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9726 | 5.24k | } |
9727 | 5.24k | if (_PyObject_LookupAttr(obj, state->ctx, &tmp) < 0) { Branch (9727:13): [True: 0, False: 5.24k]
|
9728 | 0 | return 1; |
9729 | 0 | } |
9730 | 5.24k | if (tmp == NULL) { Branch (9730:13): [True: 0, False: 5.24k]
|
9731 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Tuple"); |
9732 | 0 | return 1; |
9733 | 0 | } |
9734 | 5.24k | else { |
9735 | 5.24k | int res; |
9736 | 5.24k | if (_Py_EnterRecursiveCall(" while traversing 'Tuple' node")) { Branch (9736:17): [True: 0, False: 5.24k]
|
9737 | 0 | goto failed; |
9738 | 0 | } |
9739 | 5.24k | res = obj2ast_expr_context(state, tmp, &ctx, arena); |
9740 | 5.24k | _Py_LeaveRecursiveCall(); |
9741 | 5.24k | if (res != 0) goto failed; Branch (9741:17): [True: 0, False: 5.24k]
|
9742 | 5.24k | Py_CLEAR(tmp); Line | Count | Source | 587 | 5.24k | do { \ | 588 | 5.24k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 5.24k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 5.24k, False: 0]
| 590 | 5.24k | (op) = NULL; \ | 591 | 5.24k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 5.24k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5.24k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5.24k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 5.24k | } \ | 593 | 5.24k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9743 | 5.24k | } |
9744 | 5.24k | *out = _PyAST_Tuple(elts, ctx, lineno, col_offset, end_lineno, |
9745 | 5.24k | end_col_offset, arena); |
9746 | 5.24k | if (*out == NULL) goto failed; Branch (9746:13): [True: 0, False: 5.24k]
|
9747 | 5.24k | return 0; |
9748 | 5.24k | } |
9749 | 1.29k | tp = state->Slice_type; |
9750 | 1.29k | isinstance = PyObject_IsInstance(obj, tp); |
9751 | 1.29k | if (isinstance == -1) { Branch (9751:9): [True: 0, False: 1.29k]
|
9752 | 0 | return 1; |
9753 | 0 | } |
9754 | 1.29k | if (isinstance) { Branch (9754:9): [True: 1.29k, False: 1]
|
9755 | 1.29k | expr_ty lower; |
9756 | 1.29k | expr_ty upper; |
9757 | 1.29k | expr_ty step; |
9758 | | |
9759 | 1.29k | if (_PyObject_LookupAttr(obj, state->lower, &tmp) < 0) { Branch (9759:13): [True: 0, False: 1.29k]
|
9760 | 0 | return 1; |
9761 | 0 | } |
9762 | 1.29k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.29k | #define Py_None (&_Py_NoneStruct) |
Branch (9762:13): [True: 0, False: 1.29k]
Branch (9762:28): [True: 520, False: 774]
|
9763 | 520 | Py_CLEAR(tmp); Line | Count | Source | 587 | 520 | do { \ | 588 | 520 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 520 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 520 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 520 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 520, False: 0]
| 590 | 520 | (op) = NULL; \ | 591 | 520 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 520 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 520 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 520 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 520 | } \ | 593 | 520 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9764 | 520 | lower = NULL; |
9765 | 520 | } |
9766 | 774 | else { |
9767 | 774 | int res; |
9768 | 774 | if (_Py_EnterRecursiveCall(" while traversing 'Slice' node")) { Branch (9768:17): [True: 0, False: 774]
|
9769 | 0 | goto failed; |
9770 | 0 | } |
9771 | 774 | res = obj2ast_expr(state, tmp, &lower, arena); |
9772 | 774 | _Py_LeaveRecursiveCall(); |
9773 | 774 | if (res != 0) goto failed; Branch (9773:17): [True: 0, False: 774]
|
9774 | 774 | Py_CLEAR(tmp); Line | Count | Source | 587 | 774 | do { \ | 588 | 774 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 774 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 774 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 774 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 774, False: 0]
| 590 | 774 | (op) = NULL; \ | 591 | 774 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 774 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 774 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 774 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 774 | } \ | 593 | 774 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9775 | 774 | } |
9776 | 1.29k | if (_PyObject_LookupAttr(obj, state->upper, &tmp) < 0) { Branch (9776:13): [True: 0, False: 1.29k]
|
9777 | 0 | return 1; |
9778 | 0 | } |
9779 | 1.29k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.29k | #define Py_None (&_Py_NoneStruct) |
Branch (9779:13): [True: 0, False: 1.29k]
Branch (9779:28): [True: 498, False: 796]
|
9780 | 498 | Py_CLEAR(tmp); Line | Count | Source | 587 | 498 | do { \ | 588 | 498 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 498 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 498 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 498 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 498, False: 0]
| 590 | 498 | (op) = NULL; \ | 591 | 498 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 498 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 498 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 498 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 498 | } \ | 593 | 498 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9781 | 498 | upper = NULL; |
9782 | 498 | } |
9783 | 796 | else { |
9784 | 796 | int res; |
9785 | 796 | if (_Py_EnterRecursiveCall(" while traversing 'Slice' node")) { Branch (9785:17): [True: 0, False: 796]
|
9786 | 0 | goto failed; |
9787 | 0 | } |
9788 | 796 | res = obj2ast_expr(state, tmp, &upper, arena); |
9789 | 796 | _Py_LeaveRecursiveCall(); |
9790 | 796 | if (res != 0) goto failed; Branch (9790:17): [True: 0, False: 796]
|
9791 | 796 | Py_CLEAR(tmp); Line | Count | Source | 587 | 796 | do { \ | 588 | 796 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 796 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 796 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 796 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 796, False: 0]
| 590 | 796 | (op) = NULL; \ | 591 | 796 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 796 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 796 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 796 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 796 | } \ | 593 | 796 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9792 | 796 | } |
9793 | 1.29k | if (_PyObject_LookupAttr(obj, state->step, &tmp) < 0) { Branch (9793:13): [True: 0, False: 1.29k]
|
9794 | 0 | return 1; |
9795 | 0 | } |
9796 | 1.29k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.29k | #define Py_None (&_Py_NoneStruct) |
Branch (9796:13): [True: 0, False: 1.29k]
Branch (9796:28): [True: 1.26k, False: 31]
|
9797 | 1.26k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.26k | do { \ | 588 | 1.26k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.26k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.26k, False: 0]
| 590 | 1.26k | (op) = NULL; \ | 591 | 1.26k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.26k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.26k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.26k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.26k | } \ | 593 | 1.26k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9798 | 1.26k | step = NULL; |
9799 | 1.26k | } |
9800 | 31 | else { |
9801 | 31 | int res; |
9802 | 31 | if (_Py_EnterRecursiveCall(" while traversing 'Slice' node")) { Branch (9802:17): [True: 0, False: 31]
|
9803 | 0 | goto failed; |
9804 | 0 | } |
9805 | 31 | res = obj2ast_expr(state, tmp, &step, arena); |
9806 | 31 | _Py_LeaveRecursiveCall(); |
9807 | 31 | if (res != 0) goto failed; Branch (9807:17): [True: 0, False: 31]
|
9808 | 31 | Py_CLEAR(tmp); Line | Count | Source | 587 | 31 | do { \ | 588 | 31 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 31 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 31 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 31 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 31, False: 0]
| 590 | 31 | (op) = NULL; \ | 591 | 31 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 31 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 31 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 31 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 31 | } \ | 593 | 31 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
9809 | 31 | } |
9810 | 1.29k | *out = _PyAST_Slice(lower, upper, step, lineno, col_offset, end_lineno, |
9811 | 1.29k | end_col_offset, arena); |
9812 | 1.29k | if (*out == NULL) goto failed; Branch (9812:13): [True: 0, False: 1.29k]
|
9813 | 1.29k | return 0; |
9814 | 1.29k | } |
9815 | | |
9816 | 1 | PyErr_Format(PyExc_TypeError, "expected some sort of expr, but got %R", obj); |
9817 | 89 | failed: |
9818 | 89 | Py_XDECREF(tmp); Line | Count | Source | 613 | 89 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 89 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 89 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
9819 | 89 | return 1; |
9820 | 1 | } |
9821 | | |
9822 | | int |
9823 | | obj2ast_expr_context(struct ast_state *state, PyObject* obj, expr_context_ty* |
9824 | | out, PyArena* arena) |
9825 | 166k | { |
9826 | 166k | int isinstance; |
9827 | | |
9828 | 166k | isinstance = PyObject_IsInstance(obj, state->Load_type); |
9829 | 166k | if (isinstance == -1) { Branch (9829:9): [True: 0, False: 166k]
|
9830 | 0 | return 1; |
9831 | 0 | } |
9832 | 166k | if (isinstance) { Branch (9832:9): [True: 138k, False: 28.3k]
|
9833 | 138k | *out = Load; |
9834 | 138k | return 0; |
9835 | 138k | } |
9836 | 28.3k | isinstance = PyObject_IsInstance(obj, state->Store_type); |
9837 | 28.3k | if (isinstance == -1) { Branch (9837:9): [True: 0, False: 28.3k]
|
9838 | 0 | return 1; |
9839 | 0 | } |
9840 | 28.3k | if (isinstance) { Branch (9840:9): [True: 28.0k, False: 320]
|
9841 | 28.0k | *out = Store; |
9842 | 28.0k | return 0; |
9843 | 28.0k | } |
9844 | 320 | isinstance = PyObject_IsInstance(obj, state->Del_type); |
9845 | 320 | if (isinstance == -1) { Branch (9845:9): [True: 0, False: 320]
|
9846 | 0 | return 1; |
9847 | 0 | } |
9848 | 320 | if (isinstance) { Branch (9848:9): [True: 320, False: 0]
|
9849 | 320 | *out = Del; |
9850 | 320 | return 0; |
9851 | 320 | } |
9852 | | |
9853 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of expr_context, but got %R", obj); |
9854 | 0 | return 1; |
9855 | 320 | } |
9856 | | |
9857 | | int |
9858 | | obj2ast_boolop(struct ast_state *state, PyObject* obj, boolop_ty* out, PyArena* |
9859 | | arena) |
9860 | 2.06k | { |
9861 | 2.06k | int isinstance; |
9862 | | |
9863 | 2.06k | isinstance = PyObject_IsInstance(obj, state->And_type); |
9864 | 2.06k | if (isinstance == -1) { Branch (9864:9): [True: 0, False: 2.06k]
|
9865 | 0 | return 1; |
9866 | 0 | } |
9867 | 2.06k | if (isinstance) { Branch (9867:9): [True: 1.27k, False: 793]
|
9868 | 1.27k | *out = And; |
9869 | 1.27k | return 0; |
9870 | 1.27k | } |
9871 | 793 | isinstance = PyObject_IsInstance(obj, state->Or_type); |
9872 | 793 | if (isinstance == -1) { Branch (9872:9): [True: 0, False: 793]
|
9873 | 0 | return 1; |
9874 | 0 | } |
9875 | 793 | if (isinstance) { Branch (9875:9): [True: 793, False: 0]
|
9876 | 793 | *out = Or; |
9877 | 793 | return 0; |
9878 | 793 | } |
9879 | | |
9880 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of boolop, but got %R", obj); |
9881 | 0 | return 1; |
9882 | 793 | } |
9883 | | |
9884 | | int |
9885 | | obj2ast_operator(struct ast_state *state, PyObject* obj, operator_ty* out, |
9886 | | PyArena* arena) |
9887 | 7.48k | { |
9888 | 7.48k | int isinstance; |
9889 | | |
9890 | 7.48k | isinstance = PyObject_IsInstance(obj, state->Add_type); |
9891 | 7.48k | if (isinstance == -1) { Branch (9891:9): [True: 0, False: 7.48k]
|
9892 | 0 | return 1; |
9893 | 0 | } |
9894 | 7.48k | if (isinstance) { Branch (9894:9): [True: 3.09k, False: 4.39k]
|
9895 | 3.09k | *out = Add; |
9896 | 3.09k | return 0; |
9897 | 3.09k | } |
9898 | 4.39k | isinstance = PyObject_IsInstance(obj, state->Sub_type); |
9899 | 4.39k | if (isinstance == -1) { Branch (9899:9): [True: 0, False: 4.39k]
|
9900 | 0 | return 1; |
9901 | 0 | } |
9902 | 4.39k | if (isinstance) { Branch (9902:9): [True: 966, False: 3.43k]
|
9903 | 966 | *out = Sub; |
9904 | 966 | return 0; |
9905 | 966 | } |
9906 | 3.43k | isinstance = PyObject_IsInstance(obj, state->Mult_type); |
9907 | 3.43k | if (isinstance == -1) { Branch (9907:9): [True: 0, False: 3.43k]
|
9908 | 0 | return 1; |
9909 | 0 | } |
9910 | 3.43k | if (isinstance) { Branch (9910:9): [True: 797, False: 2.63k]
|
9911 | 797 | *out = Mult; |
9912 | 797 | return 0; |
9913 | 797 | } |
9914 | 2.63k | isinstance = PyObject_IsInstance(obj, state->MatMult_type); |
9915 | 2.63k | if (isinstance == -1) { Branch (9915:9): [True: 0, False: 2.63k]
|
9916 | 0 | return 1; |
9917 | 0 | } |
9918 | 2.63k | if (isinstance) { Branch (9918:9): [True: 4, False: 2.62k]
|
9919 | 4 | *out = MatMult; |
9920 | 4 | return 0; |
9921 | 4 | } |
9922 | 2.62k | isinstance = PyObject_IsInstance(obj, state->Div_type); |
9923 | 2.62k | if (isinstance == -1) { Branch (9923:9): [True: 0, False: 2.62k]
|
9924 | 0 | return 1; |
9925 | 0 | } |
9926 | 2.62k | if (isinstance) { Branch (9926:9): [True: 174, False: 2.45k]
|
9927 | 174 | *out = Div; |
9928 | 174 | return 0; |
9929 | 174 | } |
9930 | 2.45k | isinstance = PyObject_IsInstance(obj, state->Mod_type); |
9931 | 2.45k | if (isinstance == -1) { Branch (9931:9): [True: 0, False: 2.45k]
|
9932 | 0 | return 1; |
9933 | 0 | } |
9934 | 2.45k | if (isinstance) { Branch (9934:9): [True: 1.45k, False: 1.00k]
|
9935 | 1.45k | *out = Mod; |
9936 | 1.45k | return 0; |
9937 | 1.45k | } |
9938 | 1.00k | isinstance = PyObject_IsInstance(obj, state->Pow_type); |
9939 | 1.00k | if (isinstance == -1) { Branch (9939:9): [True: 0, False: 1.00k]
|
9940 | 0 | return 1; |
9941 | 0 | } |
9942 | 1.00k | if (isinstance) { Branch (9942:9): [True: 133, False: 869]
|
9943 | 133 | *out = Pow; |
9944 | 133 | return 0; |
9945 | 133 | } |
9946 | 869 | isinstance = PyObject_IsInstance(obj, state->LShift_type); |
9947 | 869 | if (isinstance == -1) { Branch (9947:9): [True: 0, False: 869]
|
9948 | 0 | return 1; |
9949 | 0 | } |
9950 | 869 | if (isinstance) { Branch (9950:9): [True: 143, False: 726]
|
9951 | 143 | *out = LShift; |
9952 | 143 | return 0; |
9953 | 143 | } |
9954 | 726 | isinstance = PyObject_IsInstance(obj, state->RShift_type); |
9955 | 726 | if (isinstance == -1) { Branch (9955:9): [True: 0, False: 726]
|
9956 | 0 | return 1; |
9957 | 0 | } |
9958 | 726 | if (isinstance) { Branch (9958:9): [True: 66, False: 660]
|
9959 | 66 | *out = RShift; |
9960 | 66 | return 0; |
9961 | 66 | } |
9962 | 660 | isinstance = PyObject_IsInstance(obj, state->BitOr_type); |
9963 | 660 | if (isinstance == -1) { Branch (9963:9): [True: 0, False: 660]
|
9964 | 0 | return 1; |
9965 | 0 | } |
9966 | 660 | if (isinstance) { Branch (9966:9): [True: 201, False: 459]
|
9967 | 201 | *out = BitOr; |
9968 | 201 | return 0; |
9969 | 201 | } |
9970 | 459 | isinstance = PyObject_IsInstance(obj, state->BitXor_type); |
9971 | 459 | if (isinstance == -1) { Branch (9971:9): [True: 0, False: 459]
|
9972 | 0 | return 1; |
9973 | 0 | } |
9974 | 459 | if (isinstance) { Branch (9974:9): [True: 41, False: 418]
|
9975 | 41 | *out = BitXor; |
9976 | 41 | return 0; |
9977 | 41 | } |
9978 | 418 | isinstance = PyObject_IsInstance(obj, state->BitAnd_type); |
9979 | 418 | if (isinstance == -1) { Branch (9979:9): [True: 0, False: 418]
|
9980 | 0 | return 1; |
9981 | 0 | } |
9982 | 418 | if (isinstance) { Branch (9982:9): [True: 253, False: 165]
|
9983 | 253 | *out = BitAnd; |
9984 | 253 | return 0; |
9985 | 253 | } |
9986 | 165 | isinstance = PyObject_IsInstance(obj, state->FloorDiv_type); |
9987 | 165 | if (isinstance == -1) { Branch (9987:9): [True: 0, False: 165]
|
9988 | 0 | return 1; |
9989 | 0 | } |
9990 | 165 | if (isinstance) { Branch (9990:9): [True: 165, False: 0]
|
9991 | 165 | *out = FloorDiv; |
9992 | 165 | return 0; |
9993 | 165 | } |
9994 | | |
9995 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of operator, but got %R", obj); |
9996 | 0 | return 1; |
9997 | 165 | } |
9998 | | |
9999 | | int |
10000 | | obj2ast_unaryop(struct ast_state *state, PyObject* obj, unaryop_ty* out, |
10001 | | PyArena* arena) |
10002 | 3.08k | { |
10003 | 3.08k | int isinstance; |
10004 | | |
10005 | 3.08k | isinstance = PyObject_IsInstance(obj, state->Invert_type); |
10006 | 3.08k | if (isinstance == -1) { Branch (10006:9): [True: 0, False: 3.08k]
|
10007 | 0 | return 1; |
10008 | 0 | } |
10009 | 3.08k | if (isinstance) { Branch (10009:9): [True: 32, False: 3.05k]
|
10010 | 32 | *out = Invert; |
10011 | 32 | return 0; |
10012 | 32 | } |
10013 | 3.05k | isinstance = PyObject_IsInstance(obj, state->Not_type); |
10014 | 3.05k | if (isinstance == -1) { Branch (10014:9): [True: 0, False: 3.05k]
|
10015 | 0 | return 1; |
10016 | 0 | } |
10017 | 3.05k | if (isinstance) { Branch (10017:9): [True: 1.91k, False: 1.14k]
|
10018 | 1.91k | *out = Not; |
10019 | 1.91k | return 0; |
10020 | 1.91k | } |
10021 | 1.14k | isinstance = PyObject_IsInstance(obj, state->UAdd_type); |
10022 | 1.14k | if (isinstance == -1) { Branch (10022:9): [True: 0, False: 1.14k]
|
10023 | 0 | return 1; |
10024 | 0 | } |
10025 | 1.14k | if (isinstance) { Branch (10025:9): [True: 14, False: 1.12k]
|
10026 | 14 | *out = UAdd; |
10027 | 14 | return 0; |
10028 | 14 | } |
10029 | 1.12k | isinstance = PyObject_IsInstance(obj, state->USub_type); |
10030 | 1.12k | if (isinstance == -1) { Branch (10030:9): [True: 0, False: 1.12k]
|
10031 | 0 | return 1; |
10032 | 0 | } |
10033 | 1.12k | if (isinstance) { Branch (10033:9): [True: 1.12k, False: 0]
|
10034 | 1.12k | *out = USub; |
10035 | 1.12k | return 0; |
10036 | 1.12k | } |
10037 | | |
10038 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of unaryop, but got %R", obj); |
10039 | 0 | return 1; |
10040 | 1.12k | } |
10041 | | |
10042 | | int |
10043 | | obj2ast_cmpop(struct ast_state *state, PyObject* obj, cmpop_ty* out, PyArena* |
10044 | | arena) |
10045 | 8.31k | { |
10046 | 8.31k | int isinstance; |
10047 | | |
10048 | 8.31k | isinstance = PyObject_IsInstance(obj, state->Eq_type); |
10049 | 8.31k | if (isinstance == -1) { Branch (10049:9): [True: 0, False: 8.31k]
|
10050 | 0 | return 1; |
10051 | 0 | } |
10052 | 8.31k | if (isinstance) { Branch (10052:9): [True: 2.29k, False: 6.02k]
|
10053 | 2.29k | *out = Eq; |
10054 | 2.29k | return 0; |
10055 | 2.29k | } |
10056 | 6.02k | isinstance = PyObject_IsInstance(obj, state->NotEq_type); |
10057 | 6.02k | if (isinstance == -1) { Branch (10057:9): [True: 0, False: 6.02k]
|
10058 | 0 | return 1; |
10059 | 0 | } |
10060 | 6.02k | if (isinstance) { Branch (10060:9): [True: 599, False: 5.42k]
|
10061 | 599 | *out = NotEq; |
10062 | 599 | return 0; |
10063 | 599 | } |
10064 | 5.42k | isinstance = PyObject_IsInstance(obj, state->Lt_type); |
10065 | 5.42k | if (isinstance == -1) { Branch (10065:9): [True: 0, False: 5.42k]
|
10066 | 0 | return 1; |
10067 | 0 | } |
10068 | 5.42k | if (isinstance) { Branch (10068:9): [True: 583, False: 4.84k]
|
10069 | 583 | *out = Lt; |
10070 | 583 | return 0; |
10071 | 583 | } |
10072 | 4.84k | isinstance = PyObject_IsInstance(obj, state->LtE_type); |
10073 | 4.84k | if (isinstance == -1) { Branch (10073:9): [True: 0, False: 4.84k]
|
10074 | 0 | return 1; |
10075 | 0 | } |
10076 | 4.84k | if (isinstance) { Branch (10076:9): [True: 321, False: 4.51k]
|
10077 | 321 | *out = LtE; |
10078 | 321 | return 0; |
10079 | 321 | } |
10080 | 4.51k | isinstance = PyObject_IsInstance(obj, state->Gt_type); |
10081 | 4.51k | if (isinstance == -1) { Branch (10081:9): [True: 0, False: 4.51k]
|
10082 | 0 | return 1; |
10083 | 0 | } |
10084 | 4.51k | if (isinstance) { Branch (10084:9): [True: 485, False: 4.03k]
|
10085 | 485 | *out = Gt; |
10086 | 485 | return 0; |
10087 | 485 | } |
10088 | 4.03k | isinstance = PyObject_IsInstance(obj, state->GtE_type); |
10089 | 4.03k | if (isinstance == -1) { Branch (10089:9): [True: 0, False: 4.03k]
|
10090 | 0 | return 1; |
10091 | 0 | } |
10092 | 4.03k | if (isinstance) { Branch (10092:9): [True: 278, False: 3.75k]
|
10093 | 278 | *out = GtE; |
10094 | 278 | return 0; |
10095 | 278 | } |
10096 | 3.75k | isinstance = PyObject_IsInstance(obj, state->Is_type); |
10097 | 3.75k | if (isinstance == -1) { Branch (10097:9): [True: 0, False: 3.75k]
|
10098 | 0 | return 1; |
10099 | 0 | } |
10100 | 3.75k | if (isinstance) { Branch (10100:9): [True: 1.41k, False: 2.34k]
|
10101 | 1.41k | *out = Is; |
10102 | 1.41k | return 0; |
10103 | 1.41k | } |
10104 | 2.34k | isinstance = PyObject_IsInstance(obj, state->IsNot_type); |
10105 | 2.34k | if (isinstance == -1) { Branch (10105:9): [True: 0, False: 2.34k]
|
10106 | 0 | return 1; |
10107 | 0 | } |
10108 | 2.34k | if (isinstance) { Branch (10108:9): [True: 963, False: 1.38k]
|
10109 | 963 | *out = IsNot; |
10110 | 963 | return 0; |
10111 | 963 | } |
10112 | 1.38k | isinstance = PyObject_IsInstance(obj, state->In_type); |
10113 | 1.38k | if (isinstance == -1) { Branch (10113:9): [True: 0, False: 1.38k]
|
10114 | 0 | return 1; |
10115 | 0 | } |
10116 | 1.38k | if (isinstance) { Branch (10116:9): [True: 1.06k, False: 314]
|
10117 | 1.06k | *out = In; |
10118 | 1.06k | return 0; |
10119 | 1.06k | } |
10120 | 314 | isinstance = PyObject_IsInstance(obj, state->NotIn_type); |
10121 | 314 | if (isinstance == -1) { Branch (10121:9): [True: 0, False: 314]
|
10122 | 0 | return 1; |
10123 | 0 | } |
10124 | 314 | if (isinstance) { Branch (10124:9): [True: 314, False: 0]
|
10125 | 314 | *out = NotIn; |
10126 | 314 | return 0; |
10127 | 314 | } |
10128 | | |
10129 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of cmpop, but got %R", obj); |
10130 | 0 | return 1; |
10131 | 314 | } |
10132 | | |
10133 | | int |
10134 | | obj2ast_comprehension(struct ast_state *state, PyObject* obj, comprehension_ty* |
10135 | | out, PyArena* arena) |
10136 | 635 | { |
10137 | 635 | PyObject* tmp = NULL; |
10138 | 635 | expr_ty target; |
10139 | 635 | expr_ty iter; |
10140 | 635 | asdl_expr_seq* ifs; |
10141 | 635 | int is_async; |
10142 | | |
10143 | 635 | if (_PyObject_LookupAttr(obj, state->target, &tmp) < 0) { Branch (10143:9): [True: 0, False: 635]
|
10144 | 0 | return 1; |
10145 | 0 | } |
10146 | 635 | if (tmp == NULL) { Branch (10146:9): [True: 0, False: 635]
|
10147 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from comprehension"); |
10148 | 0 | return 1; |
10149 | 0 | } |
10150 | 635 | else { |
10151 | 635 | int res; |
10152 | 635 | if (_Py_EnterRecursiveCall(" while traversing 'comprehension' node")) { Branch (10152:13): [True: 0, False: 635]
|
10153 | 0 | goto failed; |
10154 | 0 | } |
10155 | 635 | res = obj2ast_expr(state, tmp, &target, arena); |
10156 | 635 | _Py_LeaveRecursiveCall(); |
10157 | 635 | if (res != 0) goto failed; Branch (10157:13): [True: 0, False: 635]
|
10158 | 635 | Py_CLEAR(tmp); Line | Count | Source | 587 | 635 | do { \ | 588 | 635 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 635 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 635, False: 0]
| 590 | 635 | (op) = NULL; \ | 591 | 635 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 635 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 635 | } \ | 593 | 635 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10159 | 635 | } |
10160 | 635 | if (_PyObject_LookupAttr(obj, state->iter, &tmp) < 0) { Branch (10160:9): [True: 0, False: 635]
|
10161 | 0 | return 1; |
10162 | 0 | } |
10163 | 635 | if (tmp == NULL) { Branch (10163:9): [True: 0, False: 635]
|
10164 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from comprehension"); |
10165 | 0 | return 1; |
10166 | 0 | } |
10167 | 635 | else { |
10168 | 635 | int res; |
10169 | 635 | if (_Py_EnterRecursiveCall(" while traversing 'comprehension' node")) { Branch (10169:13): [True: 0, False: 635]
|
10170 | 0 | goto failed; |
10171 | 0 | } |
10172 | 635 | res = obj2ast_expr(state, tmp, &iter, arena); |
10173 | 635 | _Py_LeaveRecursiveCall(); |
10174 | 635 | if (res != 0) goto failed; Branch (10174:13): [True: 0, False: 635]
|
10175 | 635 | Py_CLEAR(tmp); Line | Count | Source | 587 | 635 | do { \ | 588 | 635 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 635 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 635, False: 0]
| 590 | 635 | (op) = NULL; \ | 591 | 635 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 635 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 635 | } \ | 593 | 635 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10176 | 635 | } |
10177 | 635 | if (_PyObject_LookupAttr(obj, state->ifs, &tmp) < 0) { Branch (10177:9): [True: 0, False: 635]
|
10178 | 0 | return 1; |
10179 | 0 | } |
10180 | 635 | if (tmp == NULL) { Branch (10180:9): [True: 0, False: 635]
|
10181 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"ifs\" missing from comprehension"); |
10182 | 0 | return 1; |
10183 | 0 | } |
10184 | 635 | else { |
10185 | 635 | int res; |
10186 | 635 | Py_ssize_t len; |
10187 | 635 | Py_ssize_t i; |
10188 | 635 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 635 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 635 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10188:13): [True: 0, False: 635]
|
10189 | 0 | PyErr_Format(PyExc_TypeError, "comprehension field \"ifs\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10190 | 0 | goto failed; |
10191 | 0 | } |
10192 | 635 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 635 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10193 | 635 | ifs = _Py_asdl_expr_seq_new(len, arena); |
10194 | 635 | if (ifs == NULL) goto failed; Branch (10194:13): [True: 0, False: 635]
|
10195 | 796 | for (i = 0; i < len; i++) { Branch (10195:21): [True: 161, False: 635]
|
10196 | 161 | expr_ty val; |
10197 | 161 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 161 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 161 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 161 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10198 | 161 | Py_INCREF(tmp2); Line | Count | Source | 512 | 161 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 161 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 161 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10199 | 161 | if (_Py_EnterRecursiveCall(" while traversing 'comprehension' node")) { Branch (10199:17): [True: 0, False: 161]
|
10200 | 0 | goto failed; |
10201 | 0 | } |
10202 | 161 | res = obj2ast_expr(state, tmp2, &val, arena); |
10203 | 161 | _Py_LeaveRecursiveCall(); |
10204 | 161 | Py_DECREF(tmp2); Line | Count | Source | 548 | 161 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 161 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 161 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10205 | 161 | if (res != 0) goto failed; Branch (10205:17): [True: 0, False: 161]
|
10206 | 161 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 161 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 161 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 161 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10206:17): [True: 0, False: 161]
|
10207 | 0 | PyErr_SetString(PyExc_RuntimeError, "comprehension field \"ifs\" changed size during iteration"); |
10208 | 0 | goto failed; |
10209 | 0 | } |
10210 | 161 | asdl_seq_SET(ifs, i, val); Line | Count | Source | 94 | 161 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 161 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10211 | 161 | } |
10212 | 635 | Py_CLEAR(tmp); Line | Count | Source | 587 | 635 | do { \ | 588 | 635 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 635 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 635, False: 0]
| 590 | 635 | (op) = NULL; \ | 591 | 635 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 635 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 635 | } \ | 593 | 635 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10213 | 635 | } |
10214 | 635 | if (_PyObject_LookupAttr(obj, state->is_async, &tmp) < 0) { Branch (10214:9): [True: 0, False: 635]
|
10215 | 0 | return 1; |
10216 | 0 | } |
10217 | 635 | if (tmp == NULL) { Branch (10217:9): [True: 0, False: 635]
|
10218 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"is_async\" missing from comprehension"); |
10219 | 0 | return 1; |
10220 | 0 | } |
10221 | 635 | else { |
10222 | 635 | int res; |
10223 | 635 | if (_Py_EnterRecursiveCall(" while traversing 'comprehension' node")) { Branch (10223:13): [True: 0, False: 635]
|
10224 | 0 | goto failed; |
10225 | 0 | } |
10226 | 635 | res = obj2ast_int(state, tmp, &is_async, arena); |
10227 | 635 | _Py_LeaveRecursiveCall(); |
10228 | 635 | if (res != 0) goto failed; Branch (10228:13): [True: 0, False: 635]
|
10229 | 635 | Py_CLEAR(tmp); Line | Count | Source | 587 | 635 | do { \ | 588 | 635 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 635 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 635, False: 0]
| 590 | 635 | (op) = NULL; \ | 591 | 635 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 635 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 635 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 635 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 635 | } \ | 593 | 635 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10230 | 635 | } |
10231 | 635 | *out = _PyAST_comprehension(target, iter, ifs, is_async, arena); |
10232 | 635 | return 0; |
10233 | 0 | failed: |
10234 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10235 | 0 | return 1; |
10236 | 635 | } |
10237 | | |
10238 | | int |
10239 | | obj2ast_excepthandler(struct ast_state *state, PyObject* obj, excepthandler_ty* |
10240 | | out, PyArena* arena) |
10241 | 1.41k | { |
10242 | 1.41k | int isinstance; |
10243 | | |
10244 | 1.41k | PyObject *tmp = NULL; |
10245 | 1.41k | PyObject *tp; |
10246 | 1.41k | int lineno; |
10247 | 1.41k | int col_offset; |
10248 | 1.41k | int end_lineno; |
10249 | 1.41k | int end_col_offset; |
10250 | | |
10251 | 1.41k | if (obj == Py_None) {Line | Count | Source | 654 | 1.41k | #define Py_None (&_Py_NoneStruct) |
Branch (10251:9): [True: 0, False: 1.41k]
|
10252 | 0 | *out = NULL; |
10253 | 0 | return 0; |
10254 | 0 | } |
10255 | 1.41k | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (10255:9): [True: 0, False: 1.41k]
|
10256 | 0 | return 1; |
10257 | 0 | } |
10258 | 1.41k | if (tmp == NULL) { Branch (10258:9): [True: 0, False: 1.41k]
|
10259 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from excepthandler"); |
10260 | 0 | return 1; |
10261 | 0 | } |
10262 | 1.41k | else { |
10263 | 1.41k | int res; |
10264 | 1.41k | if (_Py_EnterRecursiveCall(" while traversing 'excepthandler' node")) { Branch (10264:13): [True: 0, False: 1.41k]
|
10265 | 0 | goto failed; |
10266 | 0 | } |
10267 | 1.41k | res = obj2ast_int(state, tmp, &lineno, arena); |
10268 | 1.41k | _Py_LeaveRecursiveCall(); |
10269 | 1.41k | if (res != 0) goto failed; Branch (10269:13): [True: 0, False: 1.41k]
|
10270 | 1.41k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.41k | do { \ | 588 | 1.41k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.41k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.41k, False: 0]
| 590 | 1.41k | (op) = NULL; \ | 591 | 1.41k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.41k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.41k | } \ | 593 | 1.41k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10271 | 1.41k | } |
10272 | 1.41k | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (10272:9): [True: 0, False: 1.41k]
|
10273 | 0 | return 1; |
10274 | 0 | } |
10275 | 1.41k | if (tmp == NULL) { Branch (10275:9): [True: 0, False: 1.41k]
|
10276 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from excepthandler"); |
10277 | 0 | return 1; |
10278 | 0 | } |
10279 | 1.41k | else { |
10280 | 1.41k | int res; |
10281 | 1.41k | if (_Py_EnterRecursiveCall(" while traversing 'excepthandler' node")) { Branch (10281:13): [True: 0, False: 1.41k]
|
10282 | 0 | goto failed; |
10283 | 0 | } |
10284 | 1.41k | res = obj2ast_int(state, tmp, &col_offset, arena); |
10285 | 1.41k | _Py_LeaveRecursiveCall(); |
10286 | 1.41k | if (res != 0) goto failed; Branch (10286:13): [True: 0, False: 1.41k]
|
10287 | 1.41k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.41k | do { \ | 588 | 1.41k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.41k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.41k, False: 0]
| 590 | 1.41k | (op) = NULL; \ | 591 | 1.41k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.41k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.41k | } \ | 593 | 1.41k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10288 | 1.41k | } |
10289 | 1.41k | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (10289:9): [True: 0, False: 1.41k]
|
10290 | 0 | return 1; |
10291 | 0 | } |
10292 | 1.41k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.41k | #define Py_None (&_Py_NoneStruct) |
Branch (10292:9): [True: 0, False: 1.41k]
Branch (10292:24): [True: 0, False: 1.41k]
|
10293 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10294 | 0 | end_lineno = lineno; |
10295 | 0 | } |
10296 | 1.41k | else { |
10297 | 1.41k | int res; |
10298 | 1.41k | if (_Py_EnterRecursiveCall(" while traversing 'excepthandler' node")) { Branch (10298:13): [True: 0, False: 1.41k]
|
10299 | 0 | goto failed; |
10300 | 0 | } |
10301 | 1.41k | res = obj2ast_int(state, tmp, &end_lineno, arena); |
10302 | 1.41k | _Py_LeaveRecursiveCall(); |
10303 | 1.41k | if (res != 0) goto failed; Branch (10303:13): [True: 0, False: 1.41k]
|
10304 | 1.41k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.41k | do { \ | 588 | 1.41k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.41k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.41k, False: 0]
| 590 | 1.41k | (op) = NULL; \ | 591 | 1.41k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.41k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.41k | } \ | 593 | 1.41k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10305 | 1.41k | } |
10306 | 1.41k | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (10306:9): [True: 0, False: 1.41k]
|
10307 | 0 | return 1; |
10308 | 0 | } |
10309 | 1.41k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.41k | #define Py_None (&_Py_NoneStruct) |
Branch (10309:9): [True: 0, False: 1.41k]
Branch (10309:24): [True: 0, False: 1.41k]
|
10310 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10311 | 0 | end_col_offset = col_offset; |
10312 | 0 | } |
10313 | 1.41k | else { |
10314 | 1.41k | int res; |
10315 | 1.41k | if (_Py_EnterRecursiveCall(" while traversing 'excepthandler' node")) { Branch (10315:13): [True: 0, False: 1.41k]
|
10316 | 0 | goto failed; |
10317 | 0 | } |
10318 | 1.41k | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
10319 | 1.41k | _Py_LeaveRecursiveCall(); |
10320 | 1.41k | if (res != 0) goto failed; Branch (10320:13): [True: 0, False: 1.41k]
|
10321 | 1.41k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.41k | do { \ | 588 | 1.41k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.41k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.41k, False: 0]
| 590 | 1.41k | (op) = NULL; \ | 591 | 1.41k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.41k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.41k | } \ | 593 | 1.41k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10322 | 1.41k | } |
10323 | 1.41k | tp = state->ExceptHandler_type; |
10324 | 1.41k | isinstance = PyObject_IsInstance(obj, tp); |
10325 | 1.41k | if (isinstance == -1) { Branch (10325:9): [True: 0, False: 1.41k]
|
10326 | 0 | return 1; |
10327 | 0 | } |
10328 | 1.41k | if (isinstance) { Branch (10328:9): [True: 1.41k, False: 0]
|
10329 | 1.41k | expr_ty type; |
10330 | 1.41k | identifier name; |
10331 | 1.41k | asdl_stmt_seq* body; |
10332 | | |
10333 | 1.41k | if (_PyObject_LookupAttr(obj, state->type, &tmp) < 0) { Branch (10333:13): [True: 0, False: 1.41k]
|
10334 | 0 | return 1; |
10335 | 0 | } |
10336 | 1.41k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.41k | #define Py_None (&_Py_NoneStruct) |
Branch (10336:13): [True: 0, False: 1.41k]
Branch (10336:28): [True: 96, False: 1.31k]
|
10337 | 96 | Py_CLEAR(tmp); Line | Count | Source | 587 | 96 | do { \ | 588 | 96 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 96 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 96 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 96 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 96, False: 0]
| 590 | 96 | (op) = NULL; \ | 591 | 96 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 96 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 96 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 96 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 96 | } \ | 593 | 96 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10338 | 96 | type = NULL; |
10339 | 96 | } |
10340 | 1.31k | else { |
10341 | 1.31k | int res; |
10342 | 1.31k | if (_Py_EnterRecursiveCall(" while traversing 'ExceptHandler' node")) { Branch (10342:17): [True: 0, False: 1.31k]
|
10343 | 0 | goto failed; |
10344 | 0 | } |
10345 | 1.31k | res = obj2ast_expr(state, tmp, &type, arena); |
10346 | 1.31k | _Py_LeaveRecursiveCall(); |
10347 | 1.31k | if (res != 0) goto failed; Branch (10347:17): [True: 0, False: 1.31k]
|
10348 | 1.31k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.31k | do { \ | 588 | 1.31k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.31k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.31k, False: 0]
| 590 | 1.31k | (op) = NULL; \ | 591 | 1.31k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.31k | } \ | 593 | 1.31k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10349 | 1.31k | } |
10350 | 1.41k | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { Branch (10350:13): [True: 0, False: 1.41k]
|
10351 | 0 | return 1; |
10352 | 0 | } |
10353 | 1.41k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.41k | #define Py_None (&_Py_NoneStruct) |
Branch (10353:13): [True: 0, False: 1.41k]
Branch (10353:28): [True: 1.17k, False: 234]
|
10354 | 1.17k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.17k | do { \ | 588 | 1.17k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.17k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.17k, False: 0]
| 590 | 1.17k | (op) = NULL; \ | 591 | 1.17k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.17k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.17k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.17k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.17k | } \ | 593 | 1.17k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10355 | 1.17k | name = NULL; |
10356 | 1.17k | } |
10357 | 234 | else { |
10358 | 234 | int res; |
10359 | 234 | if (_Py_EnterRecursiveCall(" while traversing 'ExceptHandler' node")) { Branch (10359:17): [True: 0, False: 234]
|
10360 | 0 | goto failed; |
10361 | 0 | } |
10362 | 234 | res = obj2ast_identifier(state, tmp, &name, arena); |
10363 | 234 | _Py_LeaveRecursiveCall(); |
10364 | 234 | if (res != 0) goto failed; Branch (10364:17): [True: 0, False: 234]
|
10365 | 234 | Py_CLEAR(tmp); Line | Count | Source | 587 | 234 | do { \ | 588 | 234 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 234 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 234 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 234 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 234, False: 0]
| 590 | 234 | (op) = NULL; \ | 591 | 234 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 234 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 234 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 234 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 234 | } \ | 593 | 234 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10366 | 234 | } |
10367 | 1.41k | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (10367:13): [True: 0, False: 1.41k]
|
10368 | 0 | return 1; |
10369 | 0 | } |
10370 | 1.41k | if (tmp == NULL) { Branch (10370:13): [True: 0, False: 1.41k]
|
10371 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ExceptHandler"); |
10372 | 0 | return 1; |
10373 | 0 | } |
10374 | 1.41k | else { |
10375 | 1.41k | int res; |
10376 | 1.41k | Py_ssize_t len; |
10377 | 1.41k | Py_ssize_t i; |
10378 | 1.41k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 1.41k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 1.41k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10378:17): [True: 0, False: 1.41k]
|
10379 | 0 | PyErr_Format(PyExc_TypeError, "ExceptHandler field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10380 | 0 | goto failed; |
10381 | 0 | } |
10382 | 1.41k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 1.41k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10383 | 1.41k | body = _Py_asdl_stmt_seq_new(len, arena); |
10384 | 1.41k | if (body == NULL) goto failed; Branch (10384:17): [True: 0, False: 1.41k]
|
10385 | 3.28k | for (i = 0; i < len; i++) { Branch (10385:25): [True: 1.87k, False: 1.41k]
|
10386 | 1.87k | stmt_ty val; |
10387 | 1.87k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 1.87k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 1.87k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 1.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10388 | 1.87k | Py_INCREF(tmp2); Line | Count | Source | 512 | 1.87k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.87k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10389 | 1.87k | if (_Py_EnterRecursiveCall(" while traversing 'ExceptHandler' node")) { Branch (10389:21): [True: 0, False: 1.87k]
|
10390 | 0 | goto failed; |
10391 | 0 | } |
10392 | 1.87k | res = obj2ast_stmt(state, tmp2, &val, arena); |
10393 | 1.87k | _Py_LeaveRecursiveCall(); |
10394 | 1.87k | Py_DECREF(tmp2); Line | Count | Source | 548 | 1.87k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.87k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10395 | 1.87k | if (res != 0) goto failed; Branch (10395:21): [True: 0, False: 1.87k]
|
10396 | 1.87k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 1.87k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.87k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.87k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10396:21): [True: 0, False: 1.87k]
|
10397 | 0 | PyErr_SetString(PyExc_RuntimeError, "ExceptHandler field \"body\" changed size during iteration"); |
10398 | 0 | goto failed; |
10399 | 0 | } |
10400 | 1.87k | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 1.87k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 1.87k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10401 | 1.87k | } |
10402 | 1.41k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.41k | do { \ | 588 | 1.41k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.41k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.41k, False: 0]
| 590 | 1.41k | (op) = NULL; \ | 591 | 1.41k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.41k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.41k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.41k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.41k | } \ | 593 | 1.41k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10403 | 1.41k | } |
10404 | 1.41k | *out = _PyAST_ExceptHandler(type, name, body, lineno, col_offset, |
10405 | 1.41k | end_lineno, end_col_offset, arena); |
10406 | 1.41k | if (*out == NULL) goto failed; Branch (10406:13): [True: 0, False: 1.41k]
|
10407 | 1.41k | return 0; |
10408 | 1.41k | } |
10409 | | |
10410 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of excepthandler, but got %R", obj); |
10411 | 0 | failed: |
10412 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10413 | 0 | return 1; |
10414 | 0 | } |
10415 | | |
10416 | | int |
10417 | | obj2ast_arguments(struct ast_state *state, PyObject* obj, arguments_ty* out, |
10418 | | PyArena* arena) |
10419 | 7.60k | { |
10420 | 7.60k | PyObject* tmp = NULL; |
10421 | 7.60k | asdl_arg_seq* posonlyargs; |
10422 | 7.60k | asdl_arg_seq* args; |
10423 | 7.60k | arg_ty vararg; |
10424 | 7.60k | asdl_arg_seq* kwonlyargs; |
10425 | 7.60k | asdl_expr_seq* kw_defaults; |
10426 | 7.60k | arg_ty kwarg; |
10427 | 7.60k | asdl_expr_seq* defaults; |
10428 | | |
10429 | 7.60k | if (_PyObject_LookupAttr(obj, state->posonlyargs, &tmp) < 0) { Branch (10429:9): [True: 0, False: 7.60k]
|
10430 | 0 | return 1; |
10431 | 0 | } |
10432 | 7.60k | if (tmp == NULL) { Branch (10432:9): [True: 0, False: 7.60k]
|
10433 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"posonlyargs\" missing from arguments"); |
10434 | 0 | return 1; |
10435 | 0 | } |
10436 | 7.60k | else { |
10437 | 7.60k | int res; |
10438 | 7.60k | Py_ssize_t len; |
10439 | 7.60k | Py_ssize_t i; |
10440 | 7.60k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.60k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.60k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10440:13): [True: 0, False: 7.60k]
|
10441 | 0 | PyErr_Format(PyExc_TypeError, "arguments field \"posonlyargs\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10442 | 0 | goto failed; |
10443 | 0 | } |
10444 | 7.60k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.60k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10445 | 7.60k | posonlyargs = _Py_asdl_arg_seq_new(len, arena); |
10446 | 7.60k | if (posonlyargs == NULL) goto failed; Branch (10446:13): [True: 0, False: 7.60k]
|
10447 | 7.72k | for (i = 0; i < len; i++) { Branch (10447:21): [True: 119, False: 7.60k]
|
10448 | 119 | arg_ty val; |
10449 | 119 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 119 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 119 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 119 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10450 | 119 | Py_INCREF(tmp2); Line | Count | Source | 512 | 119 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 119 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10451 | 119 | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10451:17): [True: 0, False: 119]
|
10452 | 0 | goto failed; |
10453 | 0 | } |
10454 | 119 | res = obj2ast_arg(state, tmp2, &val, arena); |
10455 | 119 | _Py_LeaveRecursiveCall(); |
10456 | 119 | Py_DECREF(tmp2); Line | Count | Source | 548 | 119 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 119 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10457 | 119 | if (res != 0) goto failed; Branch (10457:17): [True: 0, False: 119]
|
10458 | 119 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 119 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 119 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 119 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10458:17): [True: 0, False: 119]
|
10459 | 0 | PyErr_SetString(PyExc_RuntimeError, "arguments field \"posonlyargs\" changed size during iteration"); |
10460 | 0 | goto failed; |
10461 | 0 | } |
10462 | 119 | asdl_seq_SET(posonlyargs, i, val); Line | Count | Source | 94 | 119 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 119 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10463 | 119 | } |
10464 | 7.60k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.60k | do { \ | 588 | 7.60k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.60k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.60k, False: 0]
| 590 | 7.60k | (op) = NULL; \ | 591 | 7.60k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.60k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.60k | } \ | 593 | 7.60k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10465 | 7.60k | } |
10466 | 7.60k | if (_PyObject_LookupAttr(obj, state->args, &tmp) < 0) { Branch (10466:9): [True: 0, False: 7.60k]
|
10467 | 0 | return 1; |
10468 | 0 | } |
10469 | 7.60k | if (tmp == NULL) { Branch (10469:9): [True: 0, False: 7.60k]
|
10470 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from arguments"); |
10471 | 0 | return 1; |
10472 | 0 | } |
10473 | 7.60k | else { |
10474 | 7.60k | int res; |
10475 | 7.60k | Py_ssize_t len; |
10476 | 7.60k | Py_ssize_t i; |
10477 | 7.60k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.60k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.60k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10477:13): [True: 0, False: 7.60k]
|
10478 | 0 | PyErr_Format(PyExc_TypeError, "arguments field \"args\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10479 | 0 | goto failed; |
10480 | 0 | } |
10481 | 7.60k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.60k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10482 | 7.60k | args = _Py_asdl_arg_seq_new(len, arena); |
10483 | 7.60k | if (args == NULL) goto failed; Branch (10483:13): [True: 0, False: 7.60k]
|
10484 | 21.7k | for (i = 0; i < len; i++) { Branch (10484:21): [True: 14.1k, False: 7.60k]
|
10485 | 14.1k | arg_ty val; |
10486 | 14.1k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 14.1k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 14.1k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 14.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10487 | 14.1k | Py_INCREF(tmp2); Line | Count | Source | 512 | 14.1k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10488 | 14.1k | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10488:17): [True: 0, False: 14.1k]
|
10489 | 0 | goto failed; |
10490 | 0 | } |
10491 | 14.1k | res = obj2ast_arg(state, tmp2, &val, arena); |
10492 | 14.1k | _Py_LeaveRecursiveCall(); |
10493 | 14.1k | Py_DECREF(tmp2); Line | Count | Source | 548 | 14.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 14.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10494 | 14.1k | if (res != 0) goto failed; Branch (10494:17): [True: 0, False: 14.1k]
|
10495 | 14.1k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 14.1k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 14.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 14.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10495:17): [True: 0, False: 14.1k]
|
10496 | 0 | PyErr_SetString(PyExc_RuntimeError, "arguments field \"args\" changed size during iteration"); |
10497 | 0 | goto failed; |
10498 | 0 | } |
10499 | 14.1k | asdl_seq_SET(args, i, val); Line | Count | Source | 94 | 14.1k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 14.1k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10500 | 14.1k | } |
10501 | 7.60k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.60k | do { \ | 588 | 7.60k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.60k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.60k, False: 0]
| 590 | 7.60k | (op) = NULL; \ | 591 | 7.60k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.60k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.60k | } \ | 593 | 7.60k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10502 | 7.60k | } |
10503 | 7.60k | if (_PyObject_LookupAttr(obj, state->vararg, &tmp) < 0) { Branch (10503:9): [True: 0, False: 7.60k]
|
10504 | 0 | return 1; |
10505 | 0 | } |
10506 | 7.60k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 7.60k | #define Py_None (&_Py_NoneStruct) |
Branch (10506:9): [True: 0, False: 7.60k]
Branch (10506:24): [True: 7.32k, False: 283]
|
10507 | 7.32k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.32k | do { \ | 588 | 7.32k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.32k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.32k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.32k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.32k, False: 0]
| 590 | 7.32k | (op) = NULL; \ | 591 | 7.32k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.32k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.32k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.32k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.32k | } \ | 593 | 7.32k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10508 | 7.32k | vararg = NULL; |
10509 | 7.32k | } |
10510 | 283 | else { |
10511 | 283 | int res; |
10512 | 283 | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10512:13): [True: 0, False: 283]
|
10513 | 0 | goto failed; |
10514 | 0 | } |
10515 | 283 | res = obj2ast_arg(state, tmp, &vararg, arena); |
10516 | 283 | _Py_LeaveRecursiveCall(); |
10517 | 283 | if (res != 0) goto failed; Branch (10517:13): [True: 0, False: 283]
|
10518 | 283 | Py_CLEAR(tmp); Line | Count | Source | 587 | 283 | do { \ | 588 | 283 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 283 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 283 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 283 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 283, False: 0]
| 590 | 283 | (op) = NULL; \ | 591 | 283 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 283 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 283 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 283 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 283 | } \ | 593 | 283 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10519 | 283 | } |
10520 | 7.60k | if (_PyObject_LookupAttr(obj, state->kwonlyargs, &tmp) < 0) { Branch (10520:9): [True: 0, False: 7.60k]
|
10521 | 0 | return 1; |
10522 | 0 | } |
10523 | 7.60k | if (tmp == NULL) { Branch (10523:9): [True: 0, False: 7.60k]
|
10524 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"kwonlyargs\" missing from arguments"); |
10525 | 0 | return 1; |
10526 | 0 | } |
10527 | 7.60k | else { |
10528 | 7.60k | int res; |
10529 | 7.60k | Py_ssize_t len; |
10530 | 7.60k | Py_ssize_t i; |
10531 | 7.60k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.60k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.60k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10531:13): [True: 0, False: 7.60k]
|
10532 | 0 | PyErr_Format(PyExc_TypeError, "arguments field \"kwonlyargs\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10533 | 0 | goto failed; |
10534 | 0 | } |
10535 | 7.60k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.60k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10536 | 7.60k | kwonlyargs = _Py_asdl_arg_seq_new(len, arena); |
10537 | 7.60k | if (kwonlyargs == NULL) goto failed; Branch (10537:13): [True: 0, False: 7.60k]
|
10538 | 8.08k | for (i = 0; i < len; i++) { Branch (10538:21): [True: 475, False: 7.60k]
|
10539 | 475 | arg_ty val; |
10540 | 475 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 475 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 475 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10541 | 475 | Py_INCREF(tmp2); Line | Count | Source | 512 | 475 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 475 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10542 | 475 | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10542:17): [True: 0, False: 475]
|
10543 | 0 | goto failed; |
10544 | 0 | } |
10545 | 475 | res = obj2ast_arg(state, tmp2, &val, arena); |
10546 | 475 | _Py_LeaveRecursiveCall(); |
10547 | 475 | Py_DECREF(tmp2); Line | Count | Source | 548 | 475 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 475 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10548 | 475 | if (res != 0) goto failed; Branch (10548:17): [True: 0, False: 475]
|
10549 | 475 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 475 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 475 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10549:17): [True: 0, False: 475]
|
10550 | 0 | PyErr_SetString(PyExc_RuntimeError, "arguments field \"kwonlyargs\" changed size during iteration"); |
10551 | 0 | goto failed; |
10552 | 0 | } |
10553 | 475 | asdl_seq_SET(kwonlyargs, i, val); Line | Count | Source | 94 | 475 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 475 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10554 | 475 | } |
10555 | 7.60k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.60k | do { \ | 588 | 7.60k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.60k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.60k, False: 0]
| 590 | 7.60k | (op) = NULL; \ | 591 | 7.60k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.60k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.60k | } \ | 593 | 7.60k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10556 | 7.60k | } |
10557 | 7.60k | if (_PyObject_LookupAttr(obj, state->kw_defaults, &tmp) < 0) { Branch (10557:9): [True: 0, False: 7.60k]
|
10558 | 0 | return 1; |
10559 | 0 | } |
10560 | 7.60k | if (tmp == NULL) { Branch (10560:9): [True: 0, False: 7.60k]
|
10561 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"kw_defaults\" missing from arguments"); |
10562 | 0 | return 1; |
10563 | 0 | } |
10564 | 7.60k | else { |
10565 | 7.60k | int res; |
10566 | 7.60k | Py_ssize_t len; |
10567 | 7.60k | Py_ssize_t i; |
10568 | 7.60k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.60k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.60k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10568:13): [True: 0, False: 7.60k]
|
10569 | 0 | PyErr_Format(PyExc_TypeError, "arguments field \"kw_defaults\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10570 | 0 | goto failed; |
10571 | 0 | } |
10572 | 7.60k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.60k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10573 | 7.60k | kw_defaults = _Py_asdl_expr_seq_new(len, arena); |
10574 | 7.60k | if (kw_defaults == NULL) goto failed; Branch (10574:13): [True: 0, False: 7.60k]
|
10575 | 8.08k | for (i = 0; i < len; i++) { Branch (10575:21): [True: 475, False: 7.60k]
|
10576 | 475 | expr_ty val; |
10577 | 475 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 475 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 475 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10578 | 475 | Py_INCREF(tmp2); Line | Count | Source | 512 | 475 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 475 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10579 | 475 | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10579:17): [True: 0, False: 475]
|
10580 | 0 | goto failed; |
10581 | 0 | } |
10582 | 475 | res = obj2ast_expr(state, tmp2, &val, arena); |
10583 | 475 | _Py_LeaveRecursiveCall(); |
10584 | 475 | Py_DECREF(tmp2); Line | Count | Source | 548 | 475 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 475 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10585 | 475 | if (res != 0) goto failed; Branch (10585:17): [True: 0, False: 475]
|
10586 | 475 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 475 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 475 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 475 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10586:17): [True: 0, False: 475]
|
10587 | 0 | PyErr_SetString(PyExc_RuntimeError, "arguments field \"kw_defaults\" changed size during iteration"); |
10588 | 0 | goto failed; |
10589 | 0 | } |
10590 | 475 | asdl_seq_SET(kw_defaults, i, val); Line | Count | Source | 94 | 475 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 475 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10591 | 475 | } |
10592 | 7.60k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.60k | do { \ | 588 | 7.60k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.60k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.60k, False: 0]
| 590 | 7.60k | (op) = NULL; \ | 591 | 7.60k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.60k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.60k | } \ | 593 | 7.60k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10593 | 7.60k | } |
10594 | 7.60k | if (_PyObject_LookupAttr(obj, state->kwarg, &tmp) < 0) { Branch (10594:9): [True: 0, False: 7.60k]
|
10595 | 0 | return 1; |
10596 | 0 | } |
10597 | 7.60k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 7.60k | #define Py_None (&_Py_NoneStruct) |
Branch (10597:9): [True: 0, False: 7.60k]
Branch (10597:24): [True: 7.43k, False: 173]
|
10598 | 7.43k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.43k | do { \ | 588 | 7.43k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.43k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.43k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.43k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.43k, False: 0]
| 590 | 7.43k | (op) = NULL; \ | 591 | 7.43k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.43k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.43k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.43k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.43k | } \ | 593 | 7.43k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10599 | 7.43k | kwarg = NULL; |
10600 | 7.43k | } |
10601 | 173 | else { |
10602 | 173 | int res; |
10603 | 173 | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10603:13): [True: 0, False: 173]
|
10604 | 0 | goto failed; |
10605 | 0 | } |
10606 | 173 | res = obj2ast_arg(state, tmp, &kwarg, arena); |
10607 | 173 | _Py_LeaveRecursiveCall(); |
10608 | 173 | if (res != 0) goto failed; Branch (10608:13): [True: 0, False: 173]
|
10609 | 173 | Py_CLEAR(tmp); Line | Count | Source | 587 | 173 | do { \ | 588 | 173 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 173 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 173 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 173 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 173, False: 0]
| 590 | 173 | (op) = NULL; \ | 591 | 173 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 173 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 173 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 173 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 173 | } \ | 593 | 173 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10610 | 173 | } |
10611 | 7.60k | if (_PyObject_LookupAttr(obj, state->defaults, &tmp) < 0) { Branch (10611:9): [True: 0, False: 7.60k]
|
10612 | 0 | return 1; |
10613 | 0 | } |
10614 | 7.60k | if (tmp == NULL) { Branch (10614:9): [True: 0, False: 7.60k]
|
10615 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"defaults\" missing from arguments"); |
10616 | 0 | return 1; |
10617 | 0 | } |
10618 | 7.60k | else { |
10619 | 7.60k | int res; |
10620 | 7.60k | Py_ssize_t len; |
10621 | 7.60k | Py_ssize_t i; |
10622 | 7.60k | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 7.60k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 7.60k | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
Branch (10622:13): [True: 0, False: 7.60k]
|
10623 | 0 | PyErr_Format(PyExc_TypeError, "arguments field \"defaults\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10624 | 0 | goto failed; |
10625 | 0 | } |
10626 | 7.60k | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 7.60k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10627 | 7.60k | defaults = _Py_asdl_expr_seq_new(len, arena); |
10628 | 7.60k | if (defaults == NULL) goto failed; Branch (10628:13): [True: 0, False: 7.60k]
|
10629 | 10.0k | for (i = 0; i < len; i++) { Branch (10629:21): [True: 2.42k, False: 7.60k]
|
10630 | 2.42k | expr_ty val; |
10631 | 2.42k | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 2.42k | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 2.42k | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 2.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10632 | 2.42k | Py_INCREF(tmp2); Line | Count | Source | 512 | 2.42k | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10633 | 2.42k | if (_Py_EnterRecursiveCall(" while traversing 'arguments' node")) { Branch (10633:17): [True: 0, False: 2.42k]
|
10634 | 0 | goto failed; |
10635 | 0 | } |
10636 | 2.42k | res = obj2ast_expr(state, tmp2, &val, arena); |
10637 | 2.42k | _Py_LeaveRecursiveCall(); |
10638 | 2.42k | Py_DECREF(tmp2); Line | Count | Source | 548 | 2.42k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10639 | 2.42k | if (res != 0) goto failed; Branch (10639:17): [True: 0, False: 2.42k]
|
10640 | 2.42k | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 2.42k | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 2.42k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2.42k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
Branch (10640:17): [True: 0, False: 2.42k]
|
10641 | 0 | PyErr_SetString(PyExc_RuntimeError, "arguments field \"defaults\" changed size during iteration"); |
10642 | 0 | goto failed; |
10643 | 0 | } |
10644 | 2.42k | asdl_seq_SET(defaults, i, val); Line | Count | Source | 94 | 2.42k | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 2.42k | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
10645 | 2.42k | } |
10646 | 7.60k | Py_CLEAR(tmp); Line | Count | Source | 587 | 7.60k | do { \ | 588 | 7.60k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 7.60k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 7.60k, False: 0]
| 590 | 7.60k | (op) = NULL; \ | 591 | 7.60k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 7.60k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 7.60k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 7.60k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 7.60k | } \ | 593 | 7.60k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10647 | 7.60k | } |
10648 | 7.60k | *out = _PyAST_arguments(posonlyargs, args, vararg, kwonlyargs, kw_defaults, |
10649 | 7.60k | kwarg, defaults, arena); |
10650 | 7.60k | return 0; |
10651 | 0 | failed: |
10652 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10653 | 0 | return 1; |
10654 | 7.60k | } |
10655 | | |
10656 | | int |
10657 | | obj2ast_arg(struct ast_state *state, PyObject* obj, arg_ty* out, PyArena* arena) |
10658 | 15.1k | { |
10659 | 15.1k | PyObject* tmp = NULL; |
10660 | 15.1k | identifier arg; |
10661 | 15.1k | expr_ty annotation; |
10662 | 15.1k | string type_comment; |
10663 | 15.1k | int lineno; |
10664 | 15.1k | int col_offset; |
10665 | 15.1k | int end_lineno; |
10666 | 15.1k | int end_col_offset; |
10667 | | |
10668 | 15.1k | if (_PyObject_LookupAttr(obj, state->arg, &tmp) < 0) { Branch (10668:9): [True: 0, False: 15.1k]
|
10669 | 0 | return 1; |
10670 | 0 | } |
10671 | 15.1k | if (tmp == NULL) { Branch (10671:9): [True: 0, False: 15.1k]
|
10672 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from arg"); |
10673 | 0 | return 1; |
10674 | 0 | } |
10675 | 15.1k | else { |
10676 | 15.1k | int res; |
10677 | 15.1k | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { Branch (10677:13): [True: 0, False: 15.1k]
|
10678 | 0 | goto failed; |
10679 | 0 | } |
10680 | 15.1k | res = obj2ast_identifier(state, tmp, &arg, arena); |
10681 | 15.1k | _Py_LeaveRecursiveCall(); |
10682 | 15.1k | if (res != 0) goto failed; Branch (10682:13): [True: 0, False: 15.1k]
|
10683 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10684 | 15.1k | } |
10685 | 15.1k | if (_PyObject_LookupAttr(obj, state->annotation, &tmp) < 0) { Branch (10685:9): [True: 0, False: 15.1k]
|
10686 | 0 | return 1; |
10687 | 0 | } |
10688 | 15.1k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 15.1k | #define Py_None (&_Py_NoneStruct) |
Branch (10688:9): [True: 0, False: 15.1k]
Branch (10688:24): [True: 15.1k, False: 76]
|
10689 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10690 | 15.1k | annotation = NULL; |
10691 | 15.1k | } |
10692 | 76 | else { |
10693 | 76 | int res; |
10694 | 76 | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { |
10695 | 0 | goto failed; |
10696 | 0 | } |
10697 | 76 | res = obj2ast_expr(state, tmp, &annotation, arena); |
10698 | 76 | _Py_LeaveRecursiveCall(); |
10699 | 76 | if (res != 0) goto failed; |
10700 | 76 | Py_CLEAR(tmp); Line | Count | Source | 587 | 76 | do { \ | 588 | 76 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 76 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 76 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 76 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 76, False: 0]
| 590 | 76 | (op) = NULL; \ | 591 | 76 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 76 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 76 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 76 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 76 | } \ | 593 | 76 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10701 | 76 | } |
10702 | 15.1k | if (_PyObject_LookupAttr(obj, state->type_comment, &tmp) < 0) { Branch (10702:9): [True: 0, False: 15.1k]
|
10703 | 0 | return 1; |
10704 | 0 | } |
10705 | 15.1k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 15.1k | #define Py_None (&_Py_NoneStruct) |
Branch (10705:9): [True: 0, False: 15.1k]
Branch (10705:24): [True: 15.1k, False: 0]
|
10706 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10707 | 15.1k | type_comment = NULL; |
10708 | 15.1k | } |
10709 | 0 | else { |
10710 | 0 | int res; |
10711 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { |
10712 | 0 | goto failed; |
10713 | 0 | } |
10714 | 0 | res = obj2ast_string(state, tmp, &type_comment, arena); |
10715 | 0 | _Py_LeaveRecursiveCall(); |
10716 | 0 | if (res != 0) goto failed; |
10717 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10718 | 0 | } |
10719 | 15.1k | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (10719:9): [True: 0, False: 15.1k]
|
10720 | 0 | return 1; |
10721 | 0 | } |
10722 | 15.1k | if (tmp == NULL) { Branch (10722:9): [True: 0, False: 15.1k]
|
10723 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from arg"); |
10724 | 0 | return 1; |
10725 | 0 | } |
10726 | 15.1k | else { |
10727 | 15.1k | int res; |
10728 | 15.1k | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { Branch (10728:13): [True: 0, False: 15.1k]
|
10729 | 0 | goto failed; |
10730 | 0 | } |
10731 | 15.1k | res = obj2ast_int(state, tmp, &lineno, arena); |
10732 | 15.1k | _Py_LeaveRecursiveCall(); |
10733 | 15.1k | if (res != 0) goto failed; Branch (10733:13): [True: 0, False: 15.1k]
|
10734 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10735 | 15.1k | } |
10736 | 15.1k | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (10736:9): [True: 0, False: 15.1k]
|
10737 | 0 | return 1; |
10738 | 0 | } |
10739 | 15.1k | if (tmp == NULL) { Branch (10739:9): [True: 0, False: 15.1k]
|
10740 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from arg"); |
10741 | 0 | return 1; |
10742 | 0 | } |
10743 | 15.1k | else { |
10744 | 15.1k | int res; |
10745 | 15.1k | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { Branch (10745:13): [True: 0, False: 15.1k]
|
10746 | 0 | goto failed; |
10747 | 0 | } |
10748 | 15.1k | res = obj2ast_int(state, tmp, &col_offset, arena); |
10749 | 15.1k | _Py_LeaveRecursiveCall(); |
10750 | 15.1k | if (res != 0) goto failed; Branch (10750:13): [True: 0, False: 15.1k]
|
10751 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10752 | 15.1k | } |
10753 | 15.1k | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (10753:9): [True: 0, False: 15.1k]
|
10754 | 0 | return 1; |
10755 | 0 | } |
10756 | 15.1k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 15.1k | #define Py_None (&_Py_NoneStruct) |
Branch (10756:9): [True: 0, False: 15.1k]
Branch (10756:24): [True: 0, False: 15.1k]
|
10757 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10758 | 0 | end_lineno = lineno; |
10759 | 0 | } |
10760 | 15.1k | else { |
10761 | 15.1k | int res; |
10762 | 15.1k | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { Branch (10762:13): [True: 0, False: 15.1k]
|
10763 | 0 | goto failed; |
10764 | 0 | } |
10765 | 15.1k | res = obj2ast_int(state, tmp, &end_lineno, arena); |
10766 | 15.1k | _Py_LeaveRecursiveCall(); |
10767 | 15.1k | if (res != 0) goto failed; Branch (10767:13): [True: 0, False: 15.1k]
|
10768 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10769 | 15.1k | } |
10770 | 15.1k | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (10770:9): [True: 0, False: 15.1k]
|
10771 | 0 | return 1; |
10772 | 0 | } |
10773 | 15.1k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 15.1k | #define Py_None (&_Py_NoneStruct) |
Branch (10773:9): [True: 0, False: 15.1k]
Branch (10773:24): [True: 0, False: 15.1k]
|
10774 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10775 | 0 | end_col_offset = col_offset; |
10776 | 0 | } |
10777 | 15.1k | else { |
10778 | 15.1k | int res; |
10779 | 15.1k | if (_Py_EnterRecursiveCall(" while traversing 'arg' node")) { Branch (10779:13): [True: 0, False: 15.1k]
|
10780 | 0 | goto failed; |
10781 | 0 | } |
10782 | 15.1k | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
10783 | 15.1k | _Py_LeaveRecursiveCall(); |
10784 | 15.1k | if (res != 0) goto failed; Branch (10784:13): [True: 0, False: 15.1k]
|
10785 | 15.1k | Py_CLEAR(tmp); Line | Count | Source | 587 | 15.1k | do { \ | 588 | 15.1k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15.1k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15.1k, False: 0]
| 590 | 15.1k | (op) = NULL; \ | 591 | 15.1k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15.1k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15.1k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15.1k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15.1k | } \ | 593 | 15.1k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10786 | 15.1k | } |
10787 | 15.1k | *out = _PyAST_arg(arg, annotation, type_comment, lineno, col_offset, |
10788 | 15.1k | end_lineno, end_col_offset, arena); |
10789 | 15.1k | return 0; |
10790 | 0 | failed: |
10791 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10792 | 0 | return 1; |
10793 | 15.1k | } |
10794 | | |
10795 | | int |
10796 | | obj2ast_keyword(struct ast_state *state, PyObject* obj, keyword_ty* out, |
10797 | | PyArena* arena) |
10798 | 3.31k | { |
10799 | 3.31k | PyObject* tmp = NULL; |
10800 | 3.31k | identifier arg; |
10801 | 3.31k | expr_ty value; |
10802 | 3.31k | int lineno; |
10803 | 3.31k | int col_offset; |
10804 | 3.31k | int end_lineno; |
10805 | 3.31k | int end_col_offset; |
10806 | | |
10807 | 3.31k | if (_PyObject_LookupAttr(obj, state->arg, &tmp) < 0) { Branch (10807:9): [True: 0, False: 3.31k]
|
10808 | 0 | return 1; |
10809 | 0 | } |
10810 | 3.31k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 3.31k | #define Py_None (&_Py_NoneStruct) |
Branch (10810:9): [True: 0, False: 3.31k]
Branch (10810:24): [True: 154, False: 3.15k]
|
10811 | 154 | Py_CLEAR(tmp); Line | Count | Source | 587 | 154 | do { \ | 588 | 154 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 154 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 154 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 154 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 154, False: 0]
| 590 | 154 | (op) = NULL; \ | 591 | 154 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 154 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 154 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 154 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 154 | } \ | 593 | 154 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10812 | 154 | arg = NULL; |
10813 | 154 | } |
10814 | 3.15k | else { |
10815 | 3.15k | int res; |
10816 | 3.15k | if (_Py_EnterRecursiveCall(" while traversing 'keyword' node")) { Branch (10816:13): [True: 0, False: 3.15k]
|
10817 | 0 | goto failed; |
10818 | 0 | } |
10819 | 3.15k | res = obj2ast_identifier(state, tmp, &arg, arena); |
10820 | 3.15k | _Py_LeaveRecursiveCall(); |
10821 | 3.15k | if (res != 0) goto failed; Branch (10821:13): [True: 0, False: 3.15k]
|
10822 | 3.15k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.15k | do { \ | 588 | 3.15k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.15k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.15k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.15k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.15k, False: 0]
| 590 | 3.15k | (op) = NULL; \ | 591 | 3.15k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.15k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.15k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.15k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.15k | } \ | 593 | 3.15k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10823 | 3.15k | } |
10824 | 3.31k | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { Branch (10824:9): [True: 0, False: 3.31k]
|
10825 | 0 | return 1; |
10826 | 0 | } |
10827 | 3.31k | if (tmp == NULL) { Branch (10827:9): [True: 0, False: 3.31k]
|
10828 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from keyword"); |
10829 | 0 | return 1; |
10830 | 0 | } |
10831 | 3.31k | else { |
10832 | 3.31k | int res; |
10833 | 3.31k | if (_Py_EnterRecursiveCall(" while traversing 'keyword' node")) { Branch (10833:13): [True: 0, False: 3.31k]
|
10834 | 0 | goto failed; |
10835 | 0 | } |
10836 | 3.31k | res = obj2ast_expr(state, tmp, &value, arena); |
10837 | 3.31k | _Py_LeaveRecursiveCall(); |
10838 | 3.31k | if (res != 0) goto failed; Branch (10838:13): [True: 0, False: 3.31k]
|
10839 | 3.31k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.31k | do { \ | 588 | 3.31k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.31k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.31k, False: 0]
| 590 | 3.31k | (op) = NULL; \ | 591 | 3.31k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.31k | } \ | 593 | 3.31k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10840 | 3.31k | } |
10841 | 3.31k | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (10841:9): [True: 0, False: 3.31k]
|
10842 | 0 | return 1; |
10843 | 0 | } |
10844 | 3.31k | if (tmp == NULL) { Branch (10844:9): [True: 0, False: 3.31k]
|
10845 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from keyword"); |
10846 | 0 | return 1; |
10847 | 0 | } |
10848 | 3.31k | else { |
10849 | 3.31k | int res; |
10850 | 3.31k | if (_Py_EnterRecursiveCall(" while traversing 'keyword' node")) { Branch (10850:13): [True: 0, False: 3.31k]
|
10851 | 0 | goto failed; |
10852 | 0 | } |
10853 | 3.31k | res = obj2ast_int(state, tmp, &lineno, arena); |
10854 | 3.31k | _Py_LeaveRecursiveCall(); |
10855 | 3.31k | if (res != 0) goto failed; Branch (10855:13): [True: 0, False: 3.31k]
|
10856 | 3.31k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.31k | do { \ | 588 | 3.31k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.31k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.31k, False: 0]
| 590 | 3.31k | (op) = NULL; \ | 591 | 3.31k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.31k | } \ | 593 | 3.31k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10857 | 3.31k | } |
10858 | 3.31k | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (10858:9): [True: 0, False: 3.31k]
|
10859 | 0 | return 1; |
10860 | 0 | } |
10861 | 3.31k | if (tmp == NULL) { Branch (10861:9): [True: 0, False: 3.31k]
|
10862 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from keyword"); |
10863 | 0 | return 1; |
10864 | 0 | } |
10865 | 3.31k | else { |
10866 | 3.31k | int res; |
10867 | 3.31k | if (_Py_EnterRecursiveCall(" while traversing 'keyword' node")) { Branch (10867:13): [True: 0, False: 3.31k]
|
10868 | 0 | goto failed; |
10869 | 0 | } |
10870 | 3.31k | res = obj2ast_int(state, tmp, &col_offset, arena); |
10871 | 3.31k | _Py_LeaveRecursiveCall(); |
10872 | 3.31k | if (res != 0) goto failed; Branch (10872:13): [True: 0, False: 3.31k]
|
10873 | 3.31k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.31k | do { \ | 588 | 3.31k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.31k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.31k, False: 0]
| 590 | 3.31k | (op) = NULL; \ | 591 | 3.31k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.31k | } \ | 593 | 3.31k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10874 | 3.31k | } |
10875 | 3.31k | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (10875:9): [True: 0, False: 3.31k]
|
10876 | 0 | return 1; |
10877 | 0 | } |
10878 | 3.31k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 3.31k | #define Py_None (&_Py_NoneStruct) |
Branch (10878:9): [True: 0, False: 3.31k]
Branch (10878:24): [True: 0, False: 3.31k]
|
10879 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10880 | 0 | end_lineno = lineno; |
10881 | 0 | } |
10882 | 3.31k | else { |
10883 | 3.31k | int res; |
10884 | 3.31k | if (_Py_EnterRecursiveCall(" while traversing 'keyword' node")) { Branch (10884:13): [True: 0, False: 3.31k]
|
10885 | 0 | goto failed; |
10886 | 0 | } |
10887 | 3.31k | res = obj2ast_int(state, tmp, &end_lineno, arena); |
10888 | 3.31k | _Py_LeaveRecursiveCall(); |
10889 | 3.31k | if (res != 0) goto failed; Branch (10889:13): [True: 0, False: 3.31k]
|
10890 | 3.31k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.31k | do { \ | 588 | 3.31k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.31k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.31k, False: 0]
| 590 | 3.31k | (op) = NULL; \ | 591 | 3.31k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.31k | } \ | 593 | 3.31k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10891 | 3.31k | } |
10892 | 3.31k | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (10892:9): [True: 0, False: 3.31k]
|
10893 | 0 | return 1; |
10894 | 0 | } |
10895 | 3.31k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 3.31k | #define Py_None (&_Py_NoneStruct) |
Branch (10895:9): [True: 0, False: 3.31k]
Branch (10895:24): [True: 0, False: 3.31k]
|
10896 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10897 | 0 | end_col_offset = col_offset; |
10898 | 0 | } |
10899 | 3.31k | else { |
10900 | 3.31k | int res; |
10901 | 3.31k | if (_Py_EnterRecursiveCall(" while traversing 'keyword' node")) { Branch (10901:13): [True: 0, False: 3.31k]
|
10902 | 0 | goto failed; |
10903 | 0 | } |
10904 | 3.31k | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
10905 | 3.31k | _Py_LeaveRecursiveCall(); |
10906 | 3.31k | if (res != 0) goto failed; Branch (10906:13): [True: 0, False: 3.31k]
|
10907 | 3.31k | Py_CLEAR(tmp); Line | Count | Source | 587 | 3.31k | do { \ | 588 | 3.31k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3.31k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3.31k, False: 0]
| 590 | 3.31k | (op) = NULL; \ | 591 | 3.31k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3.31k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3.31k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3.31k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3.31k | } \ | 593 | 3.31k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10908 | 3.31k | } |
10909 | 3.31k | *out = _PyAST_keyword(arg, value, lineno, col_offset, end_lineno, |
10910 | 3.31k | end_col_offset, arena); |
10911 | 3.31k | return 0; |
10912 | 0 | failed: |
10913 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
10914 | 0 | return 1; |
10915 | 3.31k | } |
10916 | | |
10917 | | int |
10918 | | obj2ast_alias(struct ast_state *state, PyObject* obj, alias_ty* out, PyArena* |
10919 | | arena) |
10920 | 1.62k | { |
10921 | 1.62k | PyObject* tmp = NULL; |
10922 | 1.62k | identifier name; |
10923 | 1.62k | identifier asname; |
10924 | 1.62k | int lineno; |
10925 | 1.62k | int col_offset; |
10926 | 1.62k | int end_lineno; |
10927 | 1.62k | int end_col_offset; |
10928 | | |
10929 | 1.62k | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { Branch (10929:9): [True: 0, False: 1.62k]
|
10930 | 0 | return 1; |
10931 | 0 | } |
10932 | 1.62k | if (tmp == NULL) { Branch (10932:9): [True: 0, False: 1.62k]
|
10933 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from alias"); |
10934 | 0 | return 1; |
10935 | 0 | } |
10936 | 1.62k | else { |
10937 | 1.62k | int res; |
10938 | 1.62k | if (_Py_EnterRecursiveCall(" while traversing 'alias' node")) { Branch (10938:13): [True: 0, False: 1.62k]
|
10939 | 0 | goto failed; |
10940 | 0 | } |
10941 | 1.62k | res = obj2ast_identifier(state, tmp, &name, arena); |
10942 | 1.62k | _Py_LeaveRecursiveCall(); |
10943 | 1.62k | if (res != 0) goto failed; Branch (10943:13): [True: 0, False: 1.62k]
|
10944 | 1.62k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.62k | do { \ | 588 | 1.62k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.62k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.62k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.62k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.62k, False: 0]
| 590 | 1.62k | (op) = NULL; \ | 591 | 1.62k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.62k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.62k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.62k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.62k | } \ | 593 | 1.62k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10945 | 1.62k | } |
10946 | 1.62k | if (_PyObject_LookupAttr(obj, state->asname, &tmp) < 0) { Branch (10946:9): [True: 0, False: 1.62k]
|
10947 | 0 | return 1; |
10948 | 0 | } |
10949 | 1.62k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.62k | #define Py_None (&_Py_NoneStruct) |
Branch (10949:9): [True: 0, False: 1.62k]
Branch (10949:24): [True: 1.48k, False: 137]
|
10950 | 1.48k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.48k | do { \ | 588 | 1.48k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.48k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.48k, False: 0]
| 590 | 1.48k | (op) = NULL; \ | 591 | 1.48k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.48k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.48k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.48k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.48k | } \ | 593 | 1.48k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10951 | 1.48k | asname = NULL; |
10952 | 1.48k | } |
10953 | 137 | else { |
10954 | 137 | int res; |
10955 | 137 | if (_Py_EnterRecursiveCall(" while traversing 'alias' node")) { Branch (10955:13): [True: 0, False: 137]
|
10956 | 0 | goto failed; |
10957 | 0 | } |
10958 | 137 | res = obj2ast_identifier(state, tmp, &asname, arena); |
10959 | 137 | _Py_LeaveRecursiveCall(); |
10960 | 137 | if (res != 0) goto failed; Branch (10960:13): [True: 0, False: 137]
|
10961 | 137 | Py_CLEAR(tmp); Line | Count | Source | 587 | 137 | do { \ | 588 | 137 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 137 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 137 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 137 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 137, False: 0]
| 590 | 137 | (op) = NULL; \ | 591 | 137 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 137 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 137 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 137 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 137 | } \ | 593 | 137 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10962 | 137 | } |
10963 | 1.62k | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (10963:9): [True: 0, False: 1.62k]
|
10964 | 0 | return 1; |
10965 | 0 | } |
10966 | 1.62k | if (tmp == NULL) { Branch (10966:9): [True: 0, False: 1.62k]
|
10967 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from alias"); |
10968 | 0 | return 1; |
10969 | 0 | } |
10970 | 1.62k | else { |
10971 | 1.62k | int res; |
10972 | 1.62k | if (_Py_EnterRecursiveCall(" while traversing 'alias' node")) { Branch (10972:13): [True: 0, False: 1.62k]
|
10973 | 0 | goto failed; |
10974 | 0 | } |
10975 | 1.62k | res = obj2ast_int(state, tmp, &lineno, arena); |
10976 | 1.62k | _Py_LeaveRecursiveCall(); |
10977 | 1.62k | if (res != 0) goto failed; Branch (10977:13): [True: 0, False: 1.62k]
|
10978 | 1.62k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.62k | do { \ | 588 | 1.62k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.62k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.62k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.62k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.62k, False: 0]
| 590 | 1.62k | (op) = NULL; \ | 591 | 1.62k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.62k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.62k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.62k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.62k | } \ | 593 | 1.62k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10979 | 1.62k | } |
10980 | 1.62k | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (10980:9): [True: 0, False: 1.62k]
|
10981 | 0 | return 1; |
10982 | 0 | } |
10983 | 1.62k | if (tmp == NULL) { Branch (10983:9): [True: 0, False: 1.62k]
|
10984 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from alias"); |
10985 | 0 | return 1; |
10986 | 0 | } |
10987 | 1.62k | else { |
10988 | 1.62k | int res; |
10989 | 1.62k | if (_Py_EnterRecursiveCall(" while traversing 'alias' node")) { Branch (10989:13): [True: 0, False: 1.62k]
|
10990 | 0 | goto failed; |
10991 | 0 | } |
10992 | 1.62k | res = obj2ast_int(state, tmp, &col_offset, arena); |
10993 | 1.62k | _Py_LeaveRecursiveCall(); |
10994 | 1.62k | if (res != 0) goto failed; Branch (10994:13): [True: 0, False: 1.62k]
|
10995 | 1.62k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.62k | do { \ | 588 | 1.62k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.62k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.62k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.62k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.62k, False: 0]
| 590 | 1.62k | (op) = NULL; \ | 591 | 1.62k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.62k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.62k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.62k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.62k | } \ | 593 | 1.62k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
10996 | 1.62k | } |
10997 | 1.62k | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (10997:9): [True: 0, False: 1.62k]
|
10998 | 0 | return 1; |
10999 | 0 | } |
11000 | 1.62k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.62k | #define Py_None (&_Py_NoneStruct) |
Branch (11000:9): [True: 0, False: 1.62k]
Branch (11000:24): [True: 3, False: 1.61k]
|
11001 | 3 | Py_CLEAR(tmp); Line | Count | Source | 587 | 3 | do { \ | 588 | 3 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3, False: 0]
| 590 | 3 | (op) = NULL; \ | 591 | 3 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3 | } \ | 593 | 3 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11002 | 3 | end_lineno = lineno; |
11003 | 3 | } |
11004 | 1.61k | else { |
11005 | 1.61k | int res; |
11006 | 1.61k | if (_Py_EnterRecursiveCall(" while traversing 'alias' node")) { Branch (11006:13): [True: 0, False: 1.61k]
|
11007 | 0 | goto failed; |
11008 | 0 | } |
11009 | 1.61k | res = obj2ast_int(state, tmp, &end_lineno, arena); |
11010 | 1.61k | _Py_LeaveRecursiveCall(); |
11011 | 1.61k | if (res != 0) goto failed; Branch (11011:13): [True: 0, False: 1.61k]
|
11012 | 1.61k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.61k | do { \ | 588 | 1.61k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.61k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.61k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.61k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.61k, False: 0]
| 590 | 1.61k | (op) = NULL; \ | 591 | 1.61k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.61k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.61k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.61k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.61k | } \ | 593 | 1.61k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11013 | 1.61k | } |
11014 | 1.62k | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (11014:9): [True: 0, False: 1.62k]
|
11015 | 0 | return 1; |
11016 | 0 | } |
11017 | 1.62k | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 1.62k | #define Py_None (&_Py_NoneStruct) |
Branch (11017:9): [True: 0, False: 1.62k]
Branch (11017:24): [True: 3, False: 1.61k]
|
11018 | 3 | Py_CLEAR(tmp); Line | Count | Source | 587 | 3 | do { \ | 588 | 3 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3, False: 0]
| 590 | 3 | (op) = NULL; \ | 591 | 3 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3 | } \ | 593 | 3 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11019 | 3 | end_col_offset = col_offset; |
11020 | 3 | } |
11021 | 1.61k | else { |
11022 | 1.61k | int res; |
11023 | 1.61k | if (_Py_EnterRecursiveCall(" while traversing 'alias' node")) { Branch (11023:13): [True: 0, False: 1.61k]
|
11024 | 0 | goto failed; |
11025 | 0 | } |
11026 | 1.61k | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
11027 | 1.61k | _Py_LeaveRecursiveCall(); |
11028 | 1.61k | if (res != 0) goto failed; Branch (11028:13): [True: 0, False: 1.61k]
|
11029 | 1.61k | Py_CLEAR(tmp); Line | Count | Source | 587 | 1.61k | do { \ | 588 | 1.61k | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1.61k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.61k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1.61k | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1.61k, False: 0]
| 590 | 1.61k | (op) = NULL; \ | 591 | 1.61k | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1.61k | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1.61k | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1.61k | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1.61k | } \ | 593 | 1.61k | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11030 | 1.61k | } |
11031 | 1.62k | *out = _PyAST_alias(name, asname, lineno, col_offset, end_lineno, |
11032 | 1.62k | end_col_offset, arena); |
11033 | 1.62k | return 0; |
11034 | 0 | failed: |
11035 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11036 | 0 | return 1; |
11037 | 1.62k | } |
11038 | | |
11039 | | int |
11040 | | obj2ast_withitem(struct ast_state *state, PyObject* obj, withitem_ty* out, |
11041 | | PyArena* arena) |
11042 | 418 | { |
11043 | 418 | PyObject* tmp = NULL; |
11044 | 418 | expr_ty context_expr; |
11045 | 418 | expr_ty optional_vars; |
11046 | | |
11047 | 418 | if (_PyObject_LookupAttr(obj, state->context_expr, &tmp) < 0) { Branch (11047:9): [True: 0, False: 418]
|
11048 | 0 | return 1; |
11049 | 0 | } |
11050 | 418 | if (tmp == NULL) { Branch (11050:9): [True: 0, False: 418]
|
11051 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"context_expr\" missing from withitem"); |
11052 | 0 | return 1; |
11053 | 0 | } |
11054 | 418 | else { |
11055 | 418 | int res; |
11056 | 418 | if (_Py_EnterRecursiveCall(" while traversing 'withitem' node")) { Branch (11056:13): [True: 0, False: 418]
|
11057 | 0 | goto failed; |
11058 | 0 | } |
11059 | 418 | res = obj2ast_expr(state, tmp, &context_expr, arena); |
11060 | 418 | _Py_LeaveRecursiveCall(); |
11061 | 418 | if (res != 0) goto failed; Branch (11061:13): [True: 0, False: 418]
|
11062 | 418 | Py_CLEAR(tmp); Line | Count | Source | 587 | 418 | do { \ | 588 | 418 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 418 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 418 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 418 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 418, False: 0]
| 590 | 418 | (op) = NULL; \ | 591 | 418 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 418 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 418 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 418 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 418 | } \ | 593 | 418 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11063 | 418 | } |
11064 | 418 | if (_PyObject_LookupAttr(obj, state->optional_vars, &tmp) < 0) { Branch (11064:9): [True: 0, False: 418]
|
11065 | 0 | return 1; |
11066 | 0 | } |
11067 | 418 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 418 | #define Py_None (&_Py_NoneStruct) |
Branch (11067:9): [True: 0, False: 418]
Branch (11067:24): [True: 225, False: 193]
|
11068 | 225 | Py_CLEAR(tmp); Line | Count | Source | 587 | 225 | do { \ | 588 | 225 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 225 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 225 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 225 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 225, False: 0]
| 590 | 225 | (op) = NULL; \ | 591 | 225 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 225 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 225 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 225 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 225 | } \ | 593 | 225 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11069 | 225 | optional_vars = NULL; |
11070 | 225 | } |
11071 | 193 | else { |
11072 | 193 | int res; |
11073 | 193 | if (_Py_EnterRecursiveCall(" while traversing 'withitem' node")) { Branch (11073:13): [True: 0, False: 193]
|
11074 | 0 | goto failed; |
11075 | 0 | } |
11076 | 193 | res = obj2ast_expr(state, tmp, &optional_vars, arena); |
11077 | 193 | _Py_LeaveRecursiveCall(); |
11078 | 193 | if (res != 0) goto failed; Branch (11078:13): [True: 0, False: 193]
|
11079 | 193 | Py_CLEAR(tmp); Line | Count | Source | 587 | 193 | do { \ | 588 | 193 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 193 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 193 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 193 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 193, False: 0]
| 590 | 193 | (op) = NULL; \ | 591 | 193 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 193 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 193 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 193 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 193 | } \ | 593 | 193 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11080 | 193 | } |
11081 | 418 | *out = _PyAST_withitem(context_expr, optional_vars, arena); |
11082 | 418 | return 0; |
11083 | 0 | failed: |
11084 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11085 | 0 | return 1; |
11086 | 418 | } |
11087 | | |
11088 | | int |
11089 | | obj2ast_match_case(struct ast_state *state, PyObject* obj, match_case_ty* out, |
11090 | | PyArena* arena) |
11091 | 33 | { |
11092 | 33 | PyObject* tmp = NULL; |
11093 | 33 | pattern_ty pattern; |
11094 | 33 | expr_ty guard; |
11095 | 33 | asdl_stmt_seq* body; |
11096 | | |
11097 | 33 | if (_PyObject_LookupAttr(obj, state->pattern, &tmp) < 0) { Branch (11097:9): [True: 0, False: 33]
|
11098 | 0 | return 1; |
11099 | 0 | } |
11100 | 33 | if (tmp == NULL) { Branch (11100:9): [True: 0, False: 33]
|
11101 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"pattern\" missing from match_case"); |
11102 | 0 | return 1; |
11103 | 0 | } |
11104 | 33 | else { |
11105 | 33 | int res; |
11106 | 33 | if (_Py_EnterRecursiveCall(" while traversing 'match_case' node")) { |
11107 | 0 | goto failed; |
11108 | 0 | } |
11109 | 33 | res = obj2ast_pattern(state, tmp, &pattern, arena); |
11110 | 33 | _Py_LeaveRecursiveCall(); |
11111 | 33 | if (res != 0) goto failed; |
11112 | 33 | Py_CLEAR(tmp); Line | Count | Source | 587 | 33 | do { \ | 588 | 33 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 33 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 33, False: 0]
| 590 | 33 | (op) = NULL; \ | 591 | 33 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 33 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 33 | } \ | 593 | 33 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11113 | 33 | } |
11114 | 33 | if (_PyObject_LookupAttr(obj, state->guard, &tmp) < 0) { Branch (11114:9): [True: 0, False: 33]
|
11115 | 0 | return 1; |
11116 | 0 | } |
11117 | 33 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 33 | #define Py_None (&_Py_NoneStruct) |
Branch (11117:9): [True: 0, False: 33]
Branch (11117:24): [True: 32, False: 1]
|
11118 | 32 | Py_CLEAR(tmp); Line | Count | Source | 587 | 32 | do { \ | 588 | 32 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 32 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 32 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 32 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 32, False: 0]
| 590 | 32 | (op) = NULL; \ | 591 | 32 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 32 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 32 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 32 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 32 | } \ | 593 | 32 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11119 | 32 | guard = NULL; |
11120 | 32 | } |
11121 | 1 | else { |
11122 | 1 | int res; |
11123 | 1 | if (_Py_EnterRecursiveCall(" while traversing 'match_case' node")) { |
11124 | 0 | goto failed; |
11125 | 0 | } |
11126 | 1 | res = obj2ast_expr(state, tmp, &guard, arena); |
11127 | 1 | _Py_LeaveRecursiveCall(); |
11128 | 1 | if (res != 0) goto failed; |
11129 | 1 | Py_CLEAR(tmp); Line | Count | Source | 587 | 1 | do { \ | 588 | 1 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1, False: 0]
| 590 | 1 | (op) = NULL; \ | 591 | 1 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1 | } \ | 593 | 1 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11130 | 1 | } |
11131 | 33 | if (_PyObject_LookupAttr(obj, state->body, &tmp) < 0) { Branch (11131:9): [True: 0, False: 33]
|
11132 | 0 | return 1; |
11133 | 0 | } |
11134 | 33 | if (tmp == NULL) { Branch (11134:9): [True: 0, False: 33]
|
11135 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from match_case"); |
11136 | 0 | return 1; |
11137 | 0 | } |
11138 | 33 | else { |
11139 | 33 | int res; |
11140 | 33 | Py_ssize_t len; |
11141 | 33 | Py_ssize_t i; |
11142 | 33 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 33 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 33 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11143 | 0 | PyErr_Format(PyExc_TypeError, "match_case field \"body\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11144 | 0 | goto failed; |
11145 | 0 | } |
11146 | 33 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 33 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11147 | 33 | body = _Py_asdl_stmt_seq_new(len, arena); |
11148 | 33 | if (body == NULL) goto failed; |
11149 | 71 | for (i = 0; i < len; i++) { Branch (11149:21): [True: 38, False: 33]
|
11150 | 38 | stmt_ty val; |
11151 | 38 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 38 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 38 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 38 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11152 | 38 | Py_INCREF(tmp2); Line | Count | Source | 512 | 38 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 38 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 38 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11153 | 38 | if (_Py_EnterRecursiveCall(" while traversing 'match_case' node")) { |
11154 | 0 | goto failed; |
11155 | 0 | } |
11156 | 38 | res = obj2ast_stmt(state, tmp2, &val, arena); |
11157 | 38 | _Py_LeaveRecursiveCall(); |
11158 | 38 | Py_DECREF(tmp2); Line | Count | Source | 548 | 38 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 38 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 38 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11159 | 38 | if (res != 0) goto failed; |
11160 | 38 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 38 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 38 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 38 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11161 | 0 | PyErr_SetString(PyExc_RuntimeError, "match_case field \"body\" changed size during iteration"); |
11162 | 0 | goto failed; |
11163 | 0 | } |
11164 | 38 | asdl_seq_SET(body, i, val); Line | Count | Source | 94 | 38 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 38 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11165 | 38 | } |
11166 | 33 | Py_CLEAR(tmp); Line | Count | Source | 587 | 33 | do { \ | 588 | 33 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 33 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 33, False: 0]
| 590 | 33 | (op) = NULL; \ | 591 | 33 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 33 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 33 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 33 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 33 | } \ | 593 | 33 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11167 | 33 | } |
11168 | 33 | *out = _PyAST_match_case(pattern, guard, body, arena); |
11169 | 33 | return 0; |
11170 | 0 | failed: |
11171 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11172 | 0 | return 1; |
11173 | 33 | } |
11174 | | |
11175 | | int |
11176 | | obj2ast_pattern(struct ast_state *state, PyObject* obj, pattern_ty* out, |
11177 | | PyArena* arena) |
11178 | 54 | { |
11179 | 54 | int isinstance; |
11180 | | |
11181 | 54 | PyObject *tmp = NULL; |
11182 | 54 | PyObject *tp; |
11183 | 54 | int lineno; |
11184 | 54 | int col_offset; |
11185 | 54 | int end_lineno; |
11186 | 54 | int end_col_offset; |
11187 | | |
11188 | 54 | if (obj == Py_None) {Line | Count | Source | 654 | 54 | #define Py_None (&_Py_NoneStruct) |
Branch (11188:9): [True: 0, False: 54]
|
11189 | 0 | *out = NULL; |
11190 | 0 | return 0; |
11191 | 0 | } |
11192 | 54 | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { Branch (11192:9): [True: 0, False: 54]
|
11193 | 0 | return 1; |
11194 | 0 | } |
11195 | 54 | if (tmp == NULL) { Branch (11195:9): [True: 0, False: 54]
|
11196 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from pattern"); |
11197 | 0 | return 1; |
11198 | 0 | } |
11199 | 54 | else { |
11200 | 54 | int res; |
11201 | 54 | if (_Py_EnterRecursiveCall(" while traversing 'pattern' node")) { |
11202 | 0 | goto failed; |
11203 | 0 | } |
11204 | 54 | res = obj2ast_int(state, tmp, &lineno, arena); |
11205 | 54 | _Py_LeaveRecursiveCall(); |
11206 | 54 | if (res != 0) goto failed; |
11207 | 54 | Py_CLEAR(tmp); Line | Count | Source | 587 | 54 | do { \ | 588 | 54 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 54 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 54, False: 0]
| 590 | 54 | (op) = NULL; \ | 591 | 54 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 54 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 54 | } \ | 593 | 54 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11208 | 54 | } |
11209 | 54 | if (_PyObject_LookupAttr(obj, state->col_offset, &tmp) < 0) { Branch (11209:9): [True: 0, False: 54]
|
11210 | 0 | return 1; |
11211 | 0 | } |
11212 | 54 | if (tmp == NULL) { Branch (11212:9): [True: 0, False: 54]
|
11213 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from pattern"); |
11214 | 0 | return 1; |
11215 | 0 | } |
11216 | 54 | else { |
11217 | 54 | int res; |
11218 | 54 | if (_Py_EnterRecursiveCall(" while traversing 'pattern' node")) { |
11219 | 0 | goto failed; |
11220 | 0 | } |
11221 | 54 | res = obj2ast_int(state, tmp, &col_offset, arena); |
11222 | 54 | _Py_LeaveRecursiveCall(); |
11223 | 54 | if (res != 0) goto failed; |
11224 | 54 | Py_CLEAR(tmp); Line | Count | Source | 587 | 54 | do { \ | 588 | 54 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 54 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 54, False: 0]
| 590 | 54 | (op) = NULL; \ | 591 | 54 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 54 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 54 | } \ | 593 | 54 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11225 | 54 | } |
11226 | 54 | if (_PyObject_LookupAttr(obj, state->end_lineno, &tmp) < 0) { Branch (11226:9): [True: 0, False: 54]
|
11227 | 0 | return 1; |
11228 | 0 | } |
11229 | 54 | if (tmp == NULL) { Branch (11229:9): [True: 0, False: 54]
|
11230 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"end_lineno\" missing from pattern"); |
11231 | 0 | return 1; |
11232 | 0 | } |
11233 | 54 | else { |
11234 | 54 | int res; |
11235 | 54 | if (_Py_EnterRecursiveCall(" while traversing 'pattern' node")) { |
11236 | 0 | goto failed; |
11237 | 0 | } |
11238 | 54 | res = obj2ast_int(state, tmp, &end_lineno, arena); |
11239 | 54 | _Py_LeaveRecursiveCall(); |
11240 | 54 | if (res != 0) goto failed; |
11241 | 54 | Py_CLEAR(tmp); Line | Count | Source | 587 | 54 | do { \ | 588 | 54 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 54 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 54, False: 0]
| 590 | 54 | (op) = NULL; \ | 591 | 54 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 54 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 54 | } \ | 593 | 54 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11242 | 54 | } |
11243 | 54 | if (_PyObject_LookupAttr(obj, state->end_col_offset, &tmp) < 0) { Branch (11243:9): [True: 0, False: 54]
|
11244 | 0 | return 1; |
11245 | 0 | } |
11246 | 54 | if (tmp == NULL) { Branch (11246:9): [True: 0, False: 54]
|
11247 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"end_col_offset\" missing from pattern"); |
11248 | 0 | return 1; |
11249 | 0 | } |
11250 | 54 | else { |
11251 | 54 | int res; |
11252 | 54 | if (_Py_EnterRecursiveCall(" while traversing 'pattern' node")) { |
11253 | 0 | goto failed; |
11254 | 0 | } |
11255 | 54 | res = obj2ast_int(state, tmp, &end_col_offset, arena); |
11256 | 54 | _Py_LeaveRecursiveCall(); |
11257 | 54 | if (res != 0) goto failed; |
11258 | 54 | Py_CLEAR(tmp); Line | Count | Source | 587 | 54 | do { \ | 588 | 54 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 54 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 54, False: 0]
| 590 | 54 | (op) = NULL; \ | 591 | 54 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 54 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 54 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 54 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 54 | } \ | 593 | 54 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11259 | 54 | } |
11260 | 54 | tp = state->MatchValue_type; |
11261 | 54 | isinstance = PyObject_IsInstance(obj, tp); |
11262 | 54 | if (isinstance == -1) { Branch (11262:9): [True: 0, False: 54]
|
11263 | 0 | return 1; |
11264 | 0 | } |
11265 | 54 | if (isinstance) { Branch (11265:9): [True: 15, False: 39]
|
11266 | 15 | expr_ty value; |
11267 | | |
11268 | 15 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { |
11269 | 0 | return 1; |
11270 | 0 | } |
11271 | 15 | if (tmp == NULL) { |
11272 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from MatchValue"); |
11273 | 0 | return 1; |
11274 | 0 | } |
11275 | 15 | else { |
11276 | 15 | int res; |
11277 | 15 | if (_Py_EnterRecursiveCall(" while traversing 'MatchValue' node")) { |
11278 | 0 | goto failed; |
11279 | 0 | } |
11280 | 15 | res = obj2ast_expr(state, tmp, &value, arena); |
11281 | 15 | _Py_LeaveRecursiveCall(); |
11282 | 15 | if (res != 0) goto failed; |
11283 | 15 | Py_CLEAR(tmp); Line | Count | Source | 587 | 15 | do { \ | 588 | 15 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 15 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 15 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 15, False: 0]
| 590 | 15 | (op) = NULL; \ | 591 | 15 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 15 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 15 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 15 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 15 | } \ | 593 | 15 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11284 | 15 | } |
11285 | 15 | *out = _PyAST_MatchValue(value, lineno, col_offset, end_lineno, |
11286 | 15 | end_col_offset, arena); |
11287 | 15 | if (*out == NULL) goto failed; |
11288 | 15 | return 0; |
11289 | 15 | } |
11290 | 39 | tp = state->MatchSingleton_type; |
11291 | 39 | isinstance = PyObject_IsInstance(obj, tp); |
11292 | 39 | if (isinstance == -1) { Branch (11292:9): [True: 0, False: 39]
|
11293 | 0 | return 1; |
11294 | 0 | } |
11295 | 39 | if (isinstance) { Branch (11295:9): [True: 6, False: 33]
|
11296 | 6 | constant value; |
11297 | | |
11298 | 6 | if (_PyObject_LookupAttr(obj, state->value, &tmp) < 0) { |
11299 | 0 | return 1; |
11300 | 0 | } |
11301 | 6 | if (tmp == NULL) { |
11302 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from MatchSingleton"); |
11303 | 0 | return 1; |
11304 | 0 | } |
11305 | 6 | else { |
11306 | 6 | int res; |
11307 | 6 | if (_Py_EnterRecursiveCall(" while traversing 'MatchSingleton' node")) { |
11308 | 0 | goto failed; |
11309 | 0 | } |
11310 | 6 | res = obj2ast_constant(state, tmp, &value, arena); |
11311 | 6 | _Py_LeaveRecursiveCall(); |
11312 | 6 | if (res != 0) goto failed; |
11313 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11314 | 6 | } |
11315 | 6 | *out = _PyAST_MatchSingleton(value, lineno, col_offset, end_lineno, |
11316 | 6 | end_col_offset, arena); |
11317 | 6 | if (*out == NULL) goto failed; |
11318 | 6 | return 0; |
11319 | 6 | } |
11320 | 33 | tp = state->MatchSequence_type; |
11321 | 33 | isinstance = PyObject_IsInstance(obj, tp); |
11322 | 33 | if (isinstance == -1) { Branch (11322:9): [True: 0, False: 33]
|
11323 | 0 | return 1; |
11324 | 0 | } |
11325 | 33 | if (isinstance) { Branch (11325:9): [True: 5, False: 28]
|
11326 | 5 | asdl_pattern_seq* patterns; |
11327 | | |
11328 | 5 | if (_PyObject_LookupAttr(obj, state->patterns, &tmp) < 0) { |
11329 | 0 | return 1; |
11330 | 0 | } |
11331 | 5 | if (tmp == NULL) { |
11332 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"patterns\" missing from MatchSequence"); |
11333 | 0 | return 1; |
11334 | 0 | } |
11335 | 5 | else { |
11336 | 5 | int res; |
11337 | 5 | Py_ssize_t len; |
11338 | 5 | Py_ssize_t i; |
11339 | 5 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 5 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 5 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11340 | 0 | PyErr_Format(PyExc_TypeError, "MatchSequence field \"patterns\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11341 | 0 | goto failed; |
11342 | 0 | } |
11343 | 5 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 5 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11344 | 5 | patterns = _Py_asdl_pattern_seq_new(len, arena); |
11345 | 5 | if (patterns == NULL) goto failed; |
11346 | 10 | for (i = 0; i < len; i++) { |
11347 | 5 | pattern_ty val; |
11348 | 5 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 5 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 5 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11349 | 5 | Py_INCREF(tmp2); Line | Count | Source | 512 | 5 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11350 | 5 | if (_Py_EnterRecursiveCall(" while traversing 'MatchSequence' node")) { |
11351 | 0 | goto failed; |
11352 | 0 | } |
11353 | 5 | res = obj2ast_pattern(state, tmp2, &val, arena); |
11354 | 5 | _Py_LeaveRecursiveCall(); |
11355 | 5 | Py_DECREF(tmp2); Line | Count | Source | 548 | 5 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11356 | 5 | if (res != 0) goto failed; |
11357 | 5 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 5 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11358 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchSequence field \"patterns\" changed size during iteration"); |
11359 | 0 | goto failed; |
11360 | 0 | } |
11361 | 5 | asdl_seq_SET(patterns, i, val); Line | Count | Source | 94 | 5 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 5 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11362 | 5 | } |
11363 | 5 | Py_CLEAR(tmp); Line | Count | Source | 587 | 5 | do { \ | 588 | 5 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 5 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 5, False: 0]
| 590 | 5 | (op) = NULL; \ | 591 | 5 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 5 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 5 | } \ | 593 | 5 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11364 | 5 | } |
11365 | 5 | *out = _PyAST_MatchSequence(patterns, lineno, col_offset, end_lineno, |
11366 | 5 | end_col_offset, arena); |
11367 | 5 | if (*out == NULL) goto failed; |
11368 | 5 | return 0; |
11369 | 5 | } |
11370 | 28 | tp = state->MatchMapping_type; |
11371 | 28 | isinstance = PyObject_IsInstance(obj, tp); |
11372 | 28 | if (isinstance == -1) { Branch (11372:9): [True: 0, False: 28]
|
11373 | 0 | return 1; |
11374 | 0 | } |
11375 | 28 | if (isinstance) { Branch (11375:9): [True: 4, False: 24]
|
11376 | 4 | asdl_expr_seq* keys; |
11377 | 4 | asdl_pattern_seq* patterns; |
11378 | 4 | identifier rest; |
11379 | | |
11380 | 4 | if (_PyObject_LookupAttr(obj, state->keys, &tmp) < 0) { |
11381 | 0 | return 1; |
11382 | 0 | } |
11383 | 4 | if (tmp == NULL) { |
11384 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"keys\" missing from MatchMapping"); |
11385 | 0 | return 1; |
11386 | 0 | } |
11387 | 4 | else { |
11388 | 4 | int res; |
11389 | 4 | Py_ssize_t len; |
11390 | 4 | Py_ssize_t i; |
11391 | 4 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 4 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 4 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11392 | 0 | PyErr_Format(PyExc_TypeError, "MatchMapping field \"keys\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11393 | 0 | goto failed; |
11394 | 0 | } |
11395 | 4 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 4 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11396 | 4 | keys = _Py_asdl_expr_seq_new(len, arena); |
11397 | 4 | if (keys == NULL) goto failed; |
11398 | 10 | for (i = 0; i < len; i++) { |
11399 | 6 | expr_ty val; |
11400 | 6 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 6 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 6 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11401 | 6 | Py_INCREF(tmp2); Line | Count | Source | 512 | 6 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11402 | 6 | if (_Py_EnterRecursiveCall(" while traversing 'MatchMapping' node")) { |
11403 | 0 | goto failed; |
11404 | 0 | } |
11405 | 6 | res = obj2ast_expr(state, tmp2, &val, arena); |
11406 | 6 | _Py_LeaveRecursiveCall(); |
11407 | 6 | Py_DECREF(tmp2); Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11408 | 6 | if (res != 0) goto failed; |
11409 | 6 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 6 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11410 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchMapping field \"keys\" changed size during iteration"); |
11411 | 0 | goto failed; |
11412 | 0 | } |
11413 | 6 | asdl_seq_SET(keys, i, val); Line | Count | Source | 94 | 6 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 6 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11414 | 6 | } |
11415 | 4 | Py_CLEAR(tmp); Line | Count | Source | 587 | 4 | do { \ | 588 | 4 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4, False: 0]
| 590 | 4 | (op) = NULL; \ | 591 | 4 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4 | } \ | 593 | 4 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11416 | 4 | } |
11417 | 4 | if (_PyObject_LookupAttr(obj, state->patterns, &tmp) < 0) { |
11418 | 0 | return 1; |
11419 | 0 | } |
11420 | 4 | if (tmp == NULL) { |
11421 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"patterns\" missing from MatchMapping"); |
11422 | 0 | return 1; |
11423 | 0 | } |
11424 | 4 | else { |
11425 | 4 | int res; |
11426 | 4 | Py_ssize_t len; |
11427 | 4 | Py_ssize_t i; |
11428 | 4 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 4 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 4 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11429 | 0 | PyErr_Format(PyExc_TypeError, "MatchMapping field \"patterns\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11430 | 0 | goto failed; |
11431 | 0 | } |
11432 | 4 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 4 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11433 | 4 | patterns = _Py_asdl_pattern_seq_new(len, arena); |
11434 | 4 | if (patterns == NULL) goto failed; |
11435 | 9 | for (i = 0; i < len; i++) { |
11436 | 5 | pattern_ty val; |
11437 | 5 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 5 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 5 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11438 | 5 | Py_INCREF(tmp2); Line | Count | Source | 512 | 5 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11439 | 5 | if (_Py_EnterRecursiveCall(" while traversing 'MatchMapping' node")) { |
11440 | 0 | goto failed; |
11441 | 0 | } |
11442 | 5 | res = obj2ast_pattern(state, tmp2, &val, arena); |
11443 | 5 | _Py_LeaveRecursiveCall(); |
11444 | 5 | Py_DECREF(tmp2); Line | Count | Source | 548 | 5 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11445 | 5 | if (res != 0) goto failed; |
11446 | 5 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 5 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11447 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchMapping field \"patterns\" changed size during iteration"); |
11448 | 0 | goto failed; |
11449 | 0 | } |
11450 | 5 | asdl_seq_SET(patterns, i, val); Line | Count | Source | 94 | 5 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 5 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11451 | 5 | } |
11452 | 4 | Py_CLEAR(tmp); Line | Count | Source | 587 | 4 | do { \ | 588 | 4 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 4 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 4, False: 0]
| 590 | 4 | (op) = NULL; \ | 591 | 4 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 4 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 4 | } \ | 593 | 4 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11453 | 4 | } |
11454 | 4 | if (_PyObject_LookupAttr(obj, state->rest, &tmp) < 0) { |
11455 | 0 | return 1; |
11456 | 0 | } |
11457 | 4 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 4 | #define Py_None (&_Py_NoneStruct) |
|
11458 | 1 | Py_CLEAR(tmp); Line | Count | Source | 587 | 1 | do { \ | 588 | 1 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1, False: 0]
| 590 | 1 | (op) = NULL; \ | 591 | 1 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1 | } \ | 593 | 1 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11459 | 1 | rest = NULL; |
11460 | 1 | } |
11461 | 3 | else { |
11462 | 3 | int res; |
11463 | 3 | if (_Py_EnterRecursiveCall(" while traversing 'MatchMapping' node")) { |
11464 | 0 | goto failed; |
11465 | 0 | } |
11466 | 3 | res = obj2ast_identifier(state, tmp, &rest, arena); |
11467 | 3 | _Py_LeaveRecursiveCall(); |
11468 | 3 | if (res != 0) goto failed; |
11469 | 3 | Py_CLEAR(tmp); Line | Count | Source | 587 | 3 | do { \ | 588 | 3 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3, False: 0]
| 590 | 3 | (op) = NULL; \ | 591 | 3 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3 | } \ | 593 | 3 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11470 | 3 | } |
11471 | 4 | *out = _PyAST_MatchMapping(keys, patterns, rest, lineno, col_offset, |
11472 | 4 | end_lineno, end_col_offset, arena); |
11473 | 4 | if (*out == NULL) goto failed; |
11474 | 4 | return 0; |
11475 | 4 | } |
11476 | 24 | tp = state->MatchClass_type; |
11477 | 24 | isinstance = PyObject_IsInstance(obj, tp); |
11478 | 24 | if (isinstance == -1) { Branch (11478:9): [True: 0, False: 24]
|
11479 | 0 | return 1; |
11480 | 0 | } |
11481 | 24 | if (isinstance) { Branch (11481:9): [True: 10, False: 14]
|
11482 | 10 | expr_ty cls; |
11483 | 10 | asdl_pattern_seq* patterns; |
11484 | 10 | asdl_identifier_seq* kwd_attrs; |
11485 | 10 | asdl_pattern_seq* kwd_patterns; |
11486 | | |
11487 | 10 | if (_PyObject_LookupAttr(obj, state->cls, &tmp) < 0) { |
11488 | 0 | return 1; |
11489 | 0 | } |
11490 | 10 | if (tmp == NULL) { |
11491 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"cls\" missing from MatchClass"); |
11492 | 0 | return 1; |
11493 | 0 | } |
11494 | 10 | else { |
11495 | 10 | int res; |
11496 | 10 | if (_Py_EnterRecursiveCall(" while traversing 'MatchClass' node")) { |
11497 | 0 | goto failed; |
11498 | 0 | } |
11499 | 10 | res = obj2ast_expr(state, tmp, &cls, arena); |
11500 | 10 | _Py_LeaveRecursiveCall(); |
11501 | 10 | if (res != 0) goto failed; |
11502 | 10 | Py_CLEAR(tmp); Line | Count | Source | 587 | 10 | do { \ | 588 | 10 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 10 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 10, False: 0]
| 590 | 10 | (op) = NULL; \ | 591 | 10 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 10 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 10 | } \ | 593 | 10 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11503 | 10 | } |
11504 | 10 | if (_PyObject_LookupAttr(obj, state->patterns, &tmp) < 0) { |
11505 | 0 | return 1; |
11506 | 0 | } |
11507 | 10 | if (tmp == NULL) { |
11508 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"patterns\" missing from MatchClass"); |
11509 | 0 | return 1; |
11510 | 0 | } |
11511 | 10 | else { |
11512 | 10 | int res; |
11513 | 10 | Py_ssize_t len; |
11514 | 10 | Py_ssize_t i; |
11515 | 10 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 10 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 10 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11516 | 0 | PyErr_Format(PyExc_TypeError, "MatchClass field \"patterns\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11517 | 0 | goto failed; |
11518 | 0 | } |
11519 | 10 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 10 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11520 | 10 | patterns = _Py_asdl_pattern_seq_new(len, arena); |
11521 | 10 | if (patterns == NULL) goto failed; |
11522 | 14 | for (i = 0; i < len; i++) { |
11523 | 4 | pattern_ty val; |
11524 | 4 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 4 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 4 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11525 | 4 | Py_INCREF(tmp2); Line | Count | Source | 512 | 4 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11526 | 4 | if (_Py_EnterRecursiveCall(" while traversing 'MatchClass' node")) { |
11527 | 0 | goto failed; |
11528 | 0 | } |
11529 | 4 | res = obj2ast_pattern(state, tmp2, &val, arena); |
11530 | 4 | _Py_LeaveRecursiveCall(); |
11531 | 4 | Py_DECREF(tmp2); Line | Count | Source | 548 | 4 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11532 | 4 | if (res != 0) goto failed; |
11533 | 4 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 4 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11534 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchClass field \"patterns\" changed size during iteration"); |
11535 | 0 | goto failed; |
11536 | 0 | } |
11537 | 4 | asdl_seq_SET(patterns, i, val); Line | Count | Source | 94 | 4 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 4 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11538 | 4 | } |
11539 | 10 | Py_CLEAR(tmp); Line | Count | Source | 587 | 10 | do { \ | 588 | 10 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 10 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 10, False: 0]
| 590 | 10 | (op) = NULL; \ | 591 | 10 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 10 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 10 | } \ | 593 | 10 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11540 | 10 | } |
11541 | 10 | if (_PyObject_LookupAttr(obj, state->kwd_attrs, &tmp) < 0) { |
11542 | 0 | return 1; |
11543 | 0 | } |
11544 | 10 | if (tmp == NULL) { |
11545 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"kwd_attrs\" missing from MatchClass"); |
11546 | 0 | return 1; |
11547 | 0 | } |
11548 | 10 | else { |
11549 | 10 | int res; |
11550 | 10 | Py_ssize_t len; |
11551 | 10 | Py_ssize_t i; |
11552 | 10 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 10 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 10 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11553 | 0 | PyErr_Format(PyExc_TypeError, "MatchClass field \"kwd_attrs\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11554 | 0 | goto failed; |
11555 | 0 | } |
11556 | 10 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 10 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11557 | 10 | kwd_attrs = _Py_asdl_identifier_seq_new(len, arena); |
11558 | 10 | if (kwd_attrs == NULL) goto failed; |
11559 | 11 | for (i = 0; i < len; i++) { |
11560 | 1 | identifier val; |
11561 | 1 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 1 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 1 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11562 | 1 | Py_INCREF(tmp2); Line | Count | Source | 512 | 1 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11563 | 1 | if (_Py_EnterRecursiveCall(" while traversing 'MatchClass' node")) { |
11564 | 0 | goto failed; |
11565 | 0 | } |
11566 | 1 | res = obj2ast_identifier(state, tmp2, &val, arena); |
11567 | 1 | _Py_LeaveRecursiveCall(); |
11568 | 1 | Py_DECREF(tmp2); Line | Count | Source | 548 | 1 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11569 | 1 | if (res != 0) goto failed; |
11570 | 1 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 1 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11571 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchClass field \"kwd_attrs\" changed size during iteration"); |
11572 | 0 | goto failed; |
11573 | 0 | } |
11574 | 1 | asdl_seq_SET(kwd_attrs, i, val); Line | Count | Source | 94 | 1 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 1 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11575 | 1 | } |
11576 | 10 | Py_CLEAR(tmp); Line | Count | Source | 587 | 10 | do { \ | 588 | 10 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 10 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 10, False: 0]
| 590 | 10 | (op) = NULL; \ | 591 | 10 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 10 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 10 | } \ | 593 | 10 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11577 | 10 | } |
11578 | 10 | if (_PyObject_LookupAttr(obj, state->kwd_patterns, &tmp) < 0) { |
11579 | 0 | return 1; |
11580 | 0 | } |
11581 | 10 | if (tmp == NULL) { |
11582 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"kwd_patterns\" missing from MatchClass"); |
11583 | 0 | return 1; |
11584 | 0 | } |
11585 | 10 | else { |
11586 | 10 | int res; |
11587 | 10 | Py_ssize_t len; |
11588 | 10 | Py_ssize_t i; |
11589 | 10 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 10 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 10 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11590 | 0 | PyErr_Format(PyExc_TypeError, "MatchClass field \"kwd_patterns\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11591 | 0 | goto failed; |
11592 | 0 | } |
11593 | 10 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 10 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11594 | 10 | kwd_patterns = _Py_asdl_pattern_seq_new(len, arena); |
11595 | 10 | if (kwd_patterns == NULL) goto failed; |
11596 | 13 | for (i = 0; i < len; i++) { |
11597 | 3 | pattern_ty val; |
11598 | 3 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 3 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 3 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11599 | 3 | Py_INCREF(tmp2); Line | Count | Source | 512 | 3 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11600 | 3 | if (_Py_EnterRecursiveCall(" while traversing 'MatchClass' node")) { |
11601 | 0 | goto failed; |
11602 | 0 | } |
11603 | 3 | res = obj2ast_pattern(state, tmp2, &val, arena); |
11604 | 3 | _Py_LeaveRecursiveCall(); |
11605 | 3 | Py_DECREF(tmp2); Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11606 | 3 | if (res != 0) goto failed; |
11607 | 3 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 3 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11608 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchClass field \"kwd_patterns\" changed size during iteration"); |
11609 | 0 | goto failed; |
11610 | 0 | } |
11611 | 3 | asdl_seq_SET(kwd_patterns, i, val); Line | Count | Source | 94 | 3 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 3 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11612 | 3 | } |
11613 | 10 | Py_CLEAR(tmp); Line | Count | Source | 587 | 10 | do { \ | 588 | 10 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 10 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 10, False: 0]
| 590 | 10 | (op) = NULL; \ | 591 | 10 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 10 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 10 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 10 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 10 | } \ | 593 | 10 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11614 | 10 | } |
11615 | 10 | *out = _PyAST_MatchClass(cls, patterns, kwd_attrs, kwd_patterns, |
11616 | 10 | lineno, col_offset, end_lineno, |
11617 | 10 | end_col_offset, arena); |
11618 | 10 | if (*out == NULL) goto failed; |
11619 | 10 | return 0; |
11620 | 10 | } |
11621 | 14 | tp = state->MatchStar_type; |
11622 | 14 | isinstance = PyObject_IsInstance(obj, tp); |
11623 | 14 | if (isinstance == -1) { Branch (11623:9): [True: 0, False: 14]
|
11624 | 0 | return 1; |
11625 | 0 | } |
11626 | 14 | if (isinstance) { Branch (11626:9): [True: 5, False: 9]
|
11627 | 5 | identifier name; |
11628 | | |
11629 | 5 | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { |
11630 | 0 | return 1; |
11631 | 0 | } |
11632 | 5 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 5 | #define Py_None (&_Py_NoneStruct) |
|
11633 | 2 | Py_CLEAR(tmp); Line | Count | Source | 587 | 2 | do { \ | 588 | 2 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 2 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 2, False: 0]
| 590 | 2 | (op) = NULL; \ | 591 | 2 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 2 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 2 | } \ | 593 | 2 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11634 | 2 | name = NULL; |
11635 | 2 | } |
11636 | 3 | else { |
11637 | 3 | int res; |
11638 | 3 | if (_Py_EnterRecursiveCall(" while traversing 'MatchStar' node")) { |
11639 | 0 | goto failed; |
11640 | 0 | } |
11641 | 3 | res = obj2ast_identifier(state, tmp, &name, arena); |
11642 | 3 | _Py_LeaveRecursiveCall(); |
11643 | 3 | if (res != 0) goto failed; |
11644 | 3 | Py_CLEAR(tmp); Line | Count | Source | 587 | 3 | do { \ | 588 | 3 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3, False: 0]
| 590 | 3 | (op) = NULL; \ | 591 | 3 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3 | } \ | 593 | 3 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11645 | 3 | } |
11646 | 5 | *out = _PyAST_MatchStar(name, lineno, col_offset, end_lineno, |
11647 | 5 | end_col_offset, arena); |
11648 | 5 | if (*out == NULL) goto failed; |
11649 | 5 | return 0; |
11650 | 5 | } |
11651 | 9 | tp = state->MatchAs_type; |
11652 | 9 | isinstance = PyObject_IsInstance(obj, tp); |
11653 | 9 | if (isinstance == -1) { Branch (11653:9): [True: 0, False: 9]
|
11654 | 0 | return 1; |
11655 | 0 | } |
11656 | 9 | if (isinstance) { Branch (11656:9): [True: 6, False: 3]
|
11657 | 6 | pattern_ty pattern; |
11658 | 6 | identifier name; |
11659 | | |
11660 | 6 | if (_PyObject_LookupAttr(obj, state->pattern, &tmp) < 0) { |
11661 | 0 | return 1; |
11662 | 0 | } |
11663 | 6 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 6 | #define Py_None (&_Py_NoneStruct) |
|
11664 | 6 | Py_CLEAR(tmp); Line | Count | Source | 587 | 6 | do { \ | 588 | 6 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 6 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 6, False: 0]
| 590 | 6 | (op) = NULL; \ | 591 | 6 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 6 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 6 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 6 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 6 | } \ | 593 | 6 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11665 | 6 | pattern = NULL; |
11666 | 6 | } |
11667 | 0 | else { |
11668 | 0 | int res; |
11669 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'MatchAs' node")) { |
11670 | 0 | goto failed; |
11671 | 0 | } |
11672 | 0 | res = obj2ast_pattern(state, tmp, &pattern, arena); |
11673 | 0 | _Py_LeaveRecursiveCall(); |
11674 | 0 | if (res != 0) goto failed; |
11675 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11676 | 0 | } |
11677 | 6 | if (_PyObject_LookupAttr(obj, state->name, &tmp) < 0) { |
11678 | 0 | return 1; |
11679 | 0 | } |
11680 | 6 | if (tmp == NULL || tmp == Py_None) {Line | Count | Source | 654 | 6 | #define Py_None (&_Py_NoneStruct) |
|
11681 | 1 | Py_CLEAR(tmp); Line | Count | Source | 587 | 1 | do { \ | 588 | 1 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 1 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 1, False: 0]
| 590 | 1 | (op) = NULL; \ | 591 | 1 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 1 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 1 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 1 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 1 | } \ | 593 | 1 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11682 | 1 | name = NULL; |
11683 | 1 | } |
11684 | 5 | else { |
11685 | 5 | int res; |
11686 | 5 | if (_Py_EnterRecursiveCall(" while traversing 'MatchAs' node")) { |
11687 | 0 | goto failed; |
11688 | 0 | } |
11689 | 5 | res = obj2ast_identifier(state, tmp, &name, arena); |
11690 | 5 | _Py_LeaveRecursiveCall(); |
11691 | 5 | if (res != 0) goto failed; |
11692 | 5 | Py_CLEAR(tmp); Line | Count | Source | 587 | 5 | do { \ | 588 | 5 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 5 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 5, False: 0]
| 590 | 5 | (op) = NULL; \ | 591 | 5 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 5 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 5 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 5 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 5 | } \ | 593 | 5 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11693 | 5 | } |
11694 | 6 | *out = _PyAST_MatchAs(pattern, name, lineno, col_offset, end_lineno, |
11695 | 6 | end_col_offset, arena); |
11696 | 6 | if (*out == NULL) goto failed; |
11697 | 6 | return 0; |
11698 | 6 | } |
11699 | 3 | tp = state->MatchOr_type; |
11700 | 3 | isinstance = PyObject_IsInstance(obj, tp); |
11701 | 3 | if (isinstance == -1) { Branch (11701:9): [True: 0, False: 3]
|
11702 | 0 | return 1; |
11703 | 0 | } |
11704 | 3 | if (isinstance) { Branch (11704:9): [True: 3, False: 0]
|
11705 | 3 | asdl_pattern_seq* patterns; |
11706 | | |
11707 | 3 | if (_PyObject_LookupAttr(obj, state->patterns, &tmp) < 0) { |
11708 | 0 | return 1; |
11709 | 0 | } |
11710 | 3 | if (tmp == NULL) { |
11711 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"patterns\" missing from MatchOr"); |
11712 | 0 | return 1; |
11713 | 0 | } |
11714 | 3 | else { |
11715 | 3 | int res; |
11716 | 3 | Py_ssize_t len; |
11717 | 3 | Py_ssize_t i; |
11718 | 3 | if (!PyList_Check(tmp)) {Line | Count | Source | 25 | 3 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS) Line | Count | Source | 782 | 3 | #define PyType_FastSubclass(type, flag) PyType_HasFeature((type), (flag)) |
|
|
11719 | 0 | PyErr_Format(PyExc_TypeError, "MatchOr field \"patterns\" must be a list, not a %.200s", _PyType_Name(Py_TYPE(tmp))); Line | Count | Source | 138 | 0 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11720 | 0 | goto failed; |
11721 | 0 | } |
11722 | 3 | len = PyList_GET_SIZE(tmp); Line | Count | Source | 37 | 3 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11723 | 3 | patterns = _Py_asdl_pattern_seq_new(len, arena); |
11724 | 3 | if (patterns == NULL) goto failed; |
11725 | 7 | for (i = 0; i < len; i++) { |
11726 | 4 | pattern_ty val; |
11727 | 4 | PyObject *tmp2 = PyList_GET_ITEM(tmp, i); Line | Count | Source | 39 | 4 | #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)]) Line | Count | Source | 29 | 4 | (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op))) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11728 | 4 | Py_INCREF(tmp2); Line | Count | Source | 512 | 4 | # define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11729 | 4 | if (_Py_EnterRecursiveCall(" while traversing 'MatchOr' node")) { |
11730 | 0 | goto failed; |
11731 | 0 | } |
11732 | 4 | res = obj2ast_pattern(state, tmp2, &val, arena); |
11733 | 4 | _Py_LeaveRecursiveCall(); |
11734 | 4 | Py_DECREF(tmp2); Line | Count | Source | 548 | 4 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11735 | 4 | if (res != 0) goto failed; |
11736 | 4 | if (len != PyList_GET_SIZE(tmp)) {Line | Count | Source | 37 | 4 | #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op)) Line | Count | Source | 109 | 4 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 4 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11737 | 0 | PyErr_SetString(PyExc_RuntimeError, "MatchOr field \"patterns\" changed size during iteration"); |
11738 | 0 | goto failed; |
11739 | 0 | } |
11740 | 4 | asdl_seq_SET(patterns, i, val); Line | Count | Source | 94 | 4 | # define asdl_seq_SET(S, I, V) _Py_RVALUE((S)->typed_elements[(I)] = (V)) Line | Count | Source | 153 | 4 | #define _Py_RVALUE(EXPR) ((void)0, (EXPR)) |
|
|
11741 | 4 | } |
11742 | 3 | Py_CLEAR(tmp); Line | Count | Source | 587 | 3 | do { \ | 588 | 3 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 3 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 3, False: 0]
| 590 | 3 | (op) = NULL; \ | 591 | 3 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 3 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 3 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 3 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 3 | } \ | 593 | 3 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11743 | 3 | } |
11744 | 3 | *out = _PyAST_MatchOr(patterns, lineno, col_offset, end_lineno, |
11745 | 3 | end_col_offset, arena); |
11746 | 3 | if (*out == NULL) goto failed; |
11747 | 3 | return 0; |
11748 | 3 | } |
11749 | | |
11750 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of pattern, but got %R", obj); |
11751 | 0 | failed: |
11752 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11753 | 0 | return 1; |
11754 | 0 | } |
11755 | | |
11756 | | int |
11757 | | obj2ast_type_ignore(struct ast_state *state, PyObject* obj, type_ignore_ty* |
11758 | | out, PyArena* arena) |
11759 | 0 | { |
11760 | 0 | int isinstance; |
11761 | |
|
11762 | 0 | PyObject *tmp = NULL; |
11763 | 0 | PyObject *tp; |
11764 | |
|
11765 | 0 | if (obj == Py_None) {Line | Count | Source | 654 | 0 | #define Py_None (&_Py_NoneStruct) |
Branch (11765:9): [True: 0, False: 0]
|
11766 | 0 | *out = NULL; |
11767 | 0 | return 0; |
11768 | 0 | } |
11769 | 0 | tp = state->TypeIgnore_type; |
11770 | 0 | isinstance = PyObject_IsInstance(obj, tp); |
11771 | 0 | if (isinstance == -1) { Branch (11771:9): [True: 0, False: 0]
|
11772 | 0 | return 1; |
11773 | 0 | } |
11774 | 0 | if (isinstance) { Branch (11774:9): [True: 0, False: 0]
|
11775 | 0 | int lineno; |
11776 | 0 | string tag; |
11777 | |
|
11778 | 0 | if (_PyObject_LookupAttr(obj, state->lineno, &tmp) < 0) { |
11779 | 0 | return 1; |
11780 | 0 | } |
11781 | 0 | if (tmp == NULL) { |
11782 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from TypeIgnore"); |
11783 | 0 | return 1; |
11784 | 0 | } |
11785 | 0 | else { |
11786 | 0 | int res; |
11787 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'TypeIgnore' node")) { |
11788 | 0 | goto failed; |
11789 | 0 | } |
11790 | 0 | res = obj2ast_int(state, tmp, &lineno, arena); |
11791 | 0 | _Py_LeaveRecursiveCall(); |
11792 | 0 | if (res != 0) goto failed; |
11793 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11794 | 0 | } |
11795 | 0 | if (_PyObject_LookupAttr(obj, state->tag, &tmp) < 0) { |
11796 | 0 | return 1; |
11797 | 0 | } |
11798 | 0 | if (tmp == NULL) { |
11799 | 0 | PyErr_SetString(PyExc_TypeError, "required field \"tag\" missing from TypeIgnore"); |
11800 | 0 | return 1; |
11801 | 0 | } |
11802 | 0 | else { |
11803 | 0 | int res; |
11804 | 0 | if (_Py_EnterRecursiveCall(" while traversing 'TypeIgnore' node")) { |
11805 | 0 | goto failed; |
11806 | 0 | } |
11807 | 0 | res = obj2ast_string(state, tmp, &tag, arena); |
11808 | 0 | _Py_LeaveRecursiveCall(); |
11809 | 0 | if (res != 0) goto failed; |
11810 | 0 | Py_CLEAR(tmp); Line | Count | Source | 587 | 0 | do { \ | 588 | 0 | PyObject *_py_tmp = _PyObject_CAST(op); \ Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
| 589 | 0 | if (_py_tmp != NULL) { \ Branch (589:13): [True: 0, False: 0]
| 590 | 0 | (op) = NULL; \ | 591 | 0 | Py_DECREF(_py_tmp); \ Line | Count | Source | 548 | 0 | #define Py_DECREF(op) Py_DECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
| 592 | 0 | } \ | 593 | 0 | } while (0) Branch (593:14): [Folded - Ignored]
|
|
11811 | 0 | } |
11812 | 0 | *out = _PyAST_TypeIgnore(lineno, tag, arena); |
11813 | 0 | if (*out == NULL) goto failed; |
11814 | 0 | return 0; |
11815 | 0 | } |
11816 | | |
11817 | 0 | PyErr_Format(PyExc_TypeError, "expected some sort of type_ignore, but got %R", obj); |
11818 | 0 | failed: |
11819 | 0 | Py_XDECREF(tmp); Line | Count | Source | 613 | 0 | # define Py_XDECREF(op) Py_XDECREF(_PyObject_CAST(op)) Line | Count | Source | 109 | 0 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 0 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
11820 | 0 | return 1; |
11821 | 0 | } |
11822 | | |
11823 | | |
11824 | | static int |
11825 | | astmodule_exec(PyObject *m) |
11826 | 17 | { |
11827 | 17 | struct ast_state *state = get_ast_state(); |
11828 | 17 | if (state == NULL) { Branch (11828:9): [True: 0, False: 17]
|
11829 | 0 | return -1; |
11830 | 0 | } |
11831 | 17 | if (PyModule_AddObjectRef(m, "AST", state->AST_type) < 0) { Branch (11831:9): [True: 0, False: 17]
|
11832 | 0 | return -1; |
11833 | 0 | } |
11834 | 17 | if (PyModule_AddIntMacro(m, PyCF_ALLOW_TOP_LEVEL_AWAIT) < 0) {Line | Count | Source | 59 | 17 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant((m), #c, (c)) |
Branch (11834:9): [True: 0, False: 17]
|
11835 | 0 | return -1; |
11836 | 0 | } |
11837 | 17 | if (PyModule_AddIntMacro(m, PyCF_ONLY_AST) < 0) {Line | Count | Source | 59 | 17 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant((m), #c, (c)) |
Branch (11837:9): [True: 0, False: 17]
|
11838 | 0 | return -1; |
11839 | 0 | } |
11840 | 17 | if (PyModule_AddIntMacro(m, PyCF_TYPE_COMMENTS) < 0) {Line | Count | Source | 59 | 17 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant((m), #c, (c)) |
Branch (11840:9): [True: 0, False: 17]
|
11841 | 0 | return -1; |
11842 | 0 | } |
11843 | 17 | if (PyModule_AddObjectRef(m, "mod", state->mod_type) < 0) { Branch (11843:9): [True: 0, False: 17]
|
11844 | 0 | return -1; |
11845 | 0 | } |
11846 | 17 | if (PyModule_AddObjectRef(m, "Module", state->Module_type) < 0) { Branch (11846:9): [True: 0, False: 17]
|
11847 | 0 | return -1; |
11848 | 0 | } |
11849 | 17 | if (PyModule_AddObjectRef(m, "Interactive", state->Interactive_type) < 0) { Branch (11849:9): [True: 0, False: 17]
|
11850 | 0 | return -1; |
11851 | 0 | } |
11852 | 17 | if (PyModule_AddObjectRef(m, "Expression", state->Expression_type) < 0) { Branch (11852:9): [True: 0, False: 17]
|
11853 | 0 | return -1; |
11854 | 0 | } |
11855 | 17 | if (PyModule_AddObjectRef(m, "FunctionType", state->FunctionType_type) < 0) Branch (11855:9): [True: 0, False: 17]
|
11856 | 0 | { |
11857 | 0 | return -1; |
11858 | 0 | } |
11859 | 17 | if (PyModule_AddObjectRef(m, "stmt", state->stmt_type) < 0) { Branch (11859:9): [True: 0, False: 17]
|
11860 | 0 | return -1; |
11861 | 0 | } |
11862 | 17 | if (PyModule_AddObjectRef(m, "FunctionDef", state->FunctionDef_type) < 0) { Branch (11862:9): [True: 0, False: 17]
|
11863 | 0 | return -1; |
11864 | 0 | } |
11865 | 17 | if (PyModule_AddObjectRef(m, "AsyncFunctionDef", Branch (11865:9): [True: 0, False: 17]
|
11866 | 17 | state->AsyncFunctionDef_type) < 0) { |
11867 | 0 | return -1; |
11868 | 0 | } |
11869 | 17 | if (PyModule_AddObjectRef(m, "ClassDef", state->ClassDef_type) < 0) { Branch (11869:9): [True: 0, False: 17]
|
11870 | 0 | return -1; |
11871 | 0 | } |
11872 | 17 | if (PyModule_AddObjectRef(m, "Return", state->Return_type) < 0) { Branch (11872:9): [True: 0, False: 17]
|
11873 | 0 | return -1; |
11874 | 0 | } |
11875 | 17 | if (PyModule_AddObjectRef(m, "Delete", state->Delete_type) < 0) { Branch (11875:9): [True: 0, False: 17]
|
11876 | 0 | return -1; |
11877 | 0 | } |
11878 | 17 | if (PyModule_AddObjectRef(m, "Assign", state->Assign_type) < 0) { Branch (11878:9): [True: 0, False: 17]
|
11879 | 0 | return -1; |
11880 | 0 | } |
11881 | 17 | if (PyModule_AddObjectRef(m, "AugAssign", state->AugAssign_type) < 0) { Branch (11881:9): [True: 0, False: 17]
|
11882 | 0 | return -1; |
11883 | 0 | } |
11884 | 17 | if (PyModule_AddObjectRef(m, "AnnAssign", state->AnnAssign_type) < 0) { Branch (11884:9): [True: 0, False: 17]
|
11885 | 0 | return -1; |
11886 | 0 | } |
11887 | 17 | if (PyModule_AddObjectRef(m, "For", state->For_type) < 0) { Branch (11887:9): [True: 0, False: 17]
|
11888 | 0 | return -1; |
11889 | 0 | } |
11890 | 17 | if (PyModule_AddObjectRef(m, "AsyncFor", state->AsyncFor_type) < 0) { Branch (11890:9): [True: 0, False: 17]
|
11891 | 0 | return -1; |
11892 | 0 | } |
11893 | 17 | if (PyModule_AddObjectRef(m, "While", state->While_type) < 0) { Branch (11893:9): [True: 0, False: 17]
|
11894 | 0 | return -1; |
11895 | 0 | } |
11896 | 17 | if (PyModule_AddObjectRef(m, "If", state->If_type) < 0) { Branch (11896:9): [True: 0, False: 17]
|
11897 | 0 | return -1; |
11898 | 0 | } |
11899 | 17 | if (PyModule_AddObjectRef(m, "With", state->With_type) < 0) { Branch (11899:9): [True: 0, False: 17]
|
11900 | 0 | return -1; |
11901 | 0 | } |
11902 | 17 | if (PyModule_AddObjectRef(m, "AsyncWith", state->AsyncWith_type) < 0) { Branch (11902:9): [True: 0, False: 17]
|
11903 | 0 | return -1; |
11904 | 0 | } |
11905 | 17 | if (PyModule_AddObjectRef(m, "Match", state->Match_type) < 0) { Branch (11905:9): [True: 0, False: 17]
|
11906 | 0 | return -1; |
11907 | 0 | } |
11908 | 17 | if (PyModule_AddObjectRef(m, "Raise", state->Raise_type) < 0) { Branch (11908:9): [True: 0, False: 17]
|
11909 | 0 | return -1; |
11910 | 0 | } |
11911 | 17 | if (PyModule_AddObjectRef(m, "Try", state->Try_type) < 0) { Branch (11911:9): [True: 0, False: 17]
|
11912 | 0 | return -1; |
11913 | 0 | } |
11914 | 17 | if (PyModule_AddObjectRef(m, "TryStar", state->TryStar_type) < 0) { Branch (11914:9): [True: 0, False: 17]
|
11915 | 0 | return -1; |
11916 | 0 | } |
11917 | 17 | if (PyModule_AddObjectRef(m, "Assert", state->Assert_type) < 0) { Branch (11917:9): [True: 0, False: 17]
|
11918 | 0 | return -1; |
11919 | 0 | } |
11920 | 17 | if (PyModule_AddObjectRef(m, "Import", state->Import_type) < 0) { Branch (11920:9): [True: 0, False: 17]
|
11921 | 0 | return -1; |
11922 | 0 | } |
11923 | 17 | if (PyModule_AddObjectRef(m, "ImportFrom", state->ImportFrom_type) < 0) { Branch (11923:9): [True: 0, False: 17]
|
11924 | 0 | return -1; |
11925 | 0 | } |
11926 | 17 | if (PyModule_AddObjectRef(m, "Global", state->Global_type) < 0) { Branch (11926:9): [True: 0, False: 17]
|
11927 | 0 | return -1; |
11928 | 0 | } |
11929 | 17 | if (PyModule_AddObjectRef(m, "Nonlocal", state->Nonlocal_type) < 0) { Branch (11929:9): [True: 0, False: 17]
|
11930 | 0 | return -1; |
11931 | 0 | } |
11932 | 17 | if (PyModule_AddObjectRef(m, "Expr", state->Expr_type) < 0) { Branch (11932:9): [True: 0, False: 17]
|
11933 | 0 | return -1; |
11934 | 0 | } |
11935 | 17 | if (PyModule_AddObjectRef(m, "Pass", state->Pass_type) < 0) { Branch (11935:9): [True: 0, False: 17]
|
11936 | 0 | return -1; |
11937 | 0 | } |
11938 | 17 | if (PyModule_AddObjectRef(m, "Break", state->Break_type) < 0) { Branch (11938:9): [True: 0, False: 17]
|
11939 | 0 | return -1; |
11940 | 0 | } |
11941 | 17 | if (PyModule_AddObjectRef(m, "Continue", state->Continue_type) < 0) { Branch (11941:9): [True: 0, False: 17]
|
11942 | 0 | return -1; |
11943 | 0 | } |
11944 | 17 | if (PyModule_AddObjectRef(m, "expr", state->expr_type) < 0) { Branch (11944:9): [True: 0, False: 17]
|
11945 | 0 | return -1; |
11946 | 0 | } |
11947 | 17 | if (PyModule_AddObjectRef(m, "BoolOp", state->BoolOp_type) < 0) { Branch (11947:9): [True: 0, False: 17]
|
11948 | 0 | return -1; |
11949 | 0 | } |
11950 | 17 | if (PyModule_AddObjectRef(m, "NamedExpr", state->NamedExpr_type) < 0) { Branch (11950:9): [True: 0, False: 17]
|
11951 | 0 | return -1; |
11952 | 0 | } |
11953 | 17 | if (PyModule_AddObjectRef(m, "BinOp", state->BinOp_type) < 0) { Branch (11953:9): [True: 0, False: 17]
|
11954 | 0 | return -1; |
11955 | 0 | } |
11956 | 17 | if (PyModule_AddObjectRef(m, "UnaryOp", state->UnaryOp_type) < 0) { Branch (11956:9): [True: 0, False: 17]
|
11957 | 0 | return -1; |
11958 | 0 | } |
11959 | 17 | if (PyModule_AddObjectRef(m, "Lambda", state->Lambda_type) < 0) { Branch (11959:9): [True: 0, False: 17]
|
11960 | 0 | return -1; |
11961 | 0 | } |
11962 | 17 | if (PyModule_AddObjectRef(m, "IfExp", state->IfExp_type) < 0) { Branch (11962:9): [True: 0, False: 17]
|
11963 | 0 | return -1; |
11964 | 0 | } |
11965 | 17 | if (PyModule_AddObjectRef(m, "Dict", state->Dict_type) < 0) { Branch (11965:9): [True: 0, False: 17]
|
11966 | 0 | return -1; |
11967 | 0 | } |
11968 | 17 | if (PyModule_AddObjectRef(m, "Set", state->Set_type) < 0) { Branch (11968:9): [True: 0, False: 17]
|
11969 | 0 | return -1; |
11970 | 0 | } |
11971 | 17 | if (PyModule_AddObjectRef(m, "ListComp", state->ListComp_type) < 0) { Branch (11971:9): [True: 0, False: 17]
|
11972 | 0 | return -1; |
11973 | 0 | } |
11974 | 17 | if (PyModule_AddObjectRef(m, "SetComp", state->SetComp_type) < 0) { Branch (11974:9): [True: 0, False: 17]
|
11975 | 0 | return -1; |
11976 | 0 | } |
11977 | 17 | if (PyModule_AddObjectRef(m, "DictComp", state->DictComp_type) < 0) { Branch (11977:9): [True: 0, False: 17]
|
11978 | 0 | return -1; |
11979 | 0 | } |
11980 | 17 | if (PyModule_AddObjectRef(m, "GeneratorExp", state->GeneratorExp_type) < 0) Branch (11980:9): [True: 0, False: 17]
|
11981 | 0 | { |
11982 | 0 | return -1; |
11983 | 0 | } |
11984 | 17 | if (PyModule_AddObjectRef(m, "Await", state->Await_type) < 0) { Branch (11984:9): [True: 0, False: 17]
|
11985 | 0 | return -1; |
11986 | 0 | } |
11987 | 17 | if (PyModule_AddObjectRef(m, "Yield", state->Yield_type) < 0) { Branch (11987:9): [True: 0, False: 17]
|
11988 | 0 | return -1; |
11989 | 0 | } |
11990 | 17 | if (PyModule_AddObjectRef(m, "YieldFrom", state->YieldFrom_type) < 0) { Branch (11990:9): [True: 0, False: 17]
|
11991 | 0 | return -1; |
11992 | 0 | } |
11993 | 17 | if (PyModule_AddObjectRef(m, "Compare", state->Compare_type) < 0) { Branch (11993:9): [True: 0, False: 17]
|
11994 | 0 | return -1; |
11995 | 0 | } |
11996 | 17 | if (PyModule_AddObjectRef(m, "Call", state->Call_type) < 0) { Branch (11996:9): [True: 0, False: 17]
|
11997 | 0 | return -1; |
11998 | 0 | } |
11999 | 17 | if (PyModule_AddObjectRef(m, "FormattedValue", state->FormattedValue_type) Branch (11999:9): [True: 0, False: 17]
|
12000 | 17 | < 0) { |
12001 | 0 | return -1; |
12002 | 0 | } |
12003 | 17 | if (PyModule_AddObjectRef(m, "JoinedStr", state->JoinedStr_type) < 0) { Branch (12003:9): [True: 0, False: 17]
|
12004 | 0 | return -1; |
12005 | 0 | } |
12006 | 17 | if (PyModule_AddObjectRef(m, "Constant", state->Constant_type) < 0) { Branch (12006:9): [True: 0, False: 17]
|
12007 | 0 | return -1; |
12008 | 0 | } |
12009 | 17 | if (PyModule_AddObjectRef(m, "Attribute", state->Attribute_type) < 0) { Branch (12009:9): [True: 0, False: 17]
|
12010 | 0 | return -1; |
12011 | 0 | } |
12012 | 17 | if (PyModule_AddObjectRef(m, "Subscript", state->Subscript_type) < 0) { Branch (12012:9): [True: 0, False: 17]
|
12013 | 0 | return -1; |
12014 | 0 | } |
12015 | 17 | if (PyModule_AddObjectRef(m, "Starred", state->Starred_type) < 0) { Branch (12015:9): [True: 0, False: 17]
|
12016 | 0 | return -1; |
12017 | 0 | } |
12018 | 17 | if (PyModule_AddObjectRef(m, "Name", state->Name_type) < 0) { Branch (12018:9): [True: 0, False: 17]
|
12019 | 0 | return -1; |
12020 | 0 | } |
12021 | 17 | if (PyModule_AddObjectRef(m, "List", state->List_type) < 0) { Branch (12021:9): [True: 0, False: 17]
|
12022 | 0 | return -1; |
12023 | 0 | } |
12024 | 17 | if (PyModule_AddObjectRef(m, "Tuple", state->Tuple_type) < 0) { Branch (12024:9): [True: 0, False: 17]
|
12025 | 0 | return -1; |
12026 | 0 | } |
12027 | 17 | if (PyModule_AddObjectRef(m, "Slice", state->Slice_type) < 0) { Branch (12027:9): [True: 0, False: 17]
|
12028 | 0 | return -1; |
12029 | 0 | } |
12030 | 17 | if (PyModule_AddObjectRef(m, "expr_context", state->expr_context_type) < 0) Branch (12030:9): [True: 0, False: 17]
|
12031 | 0 | { |
12032 | 0 | return -1; |
12033 | 0 | } |
12034 | 17 | if (PyModule_AddObjectRef(m, "Load", state->Load_type) < 0) { Branch (12034:9): [True: 0, False: 17]
|
12035 | 0 | return -1; |
12036 | 0 | } |
12037 | 17 | if (PyModule_AddObjectRef(m, "Store", state->Store_type) < 0) { Branch (12037:9): [True: 0, False: 17]
|
12038 | 0 | return -1; |
12039 | 0 | } |
12040 | 17 | if (PyModule_AddObjectRef(m, "Del", state->Del_type) < 0) { Branch (12040:9): [True: 0, False: 17]
|
12041 | 0 | return -1; |
12042 | 0 | } |
12043 | 17 | if (PyModule_AddObjectRef(m, "boolop", state->boolop_type) < 0) { Branch (12043:9): [True: 0, False: 17]
|
12044 | 0 | return -1; |
12045 | 0 | } |
12046 | 17 | if (PyModule_AddObjectRef(m, "And", state->And_type) < 0) { Branch (12046:9): [True: 0, False: 17]
|
12047 | 0 | return -1; |
12048 | 0 | } |
12049 | 17 | if (PyModule_AddObjectRef(m, "Or", state->Or_type) < 0) { Branch (12049:9): [True: 0, False: 17]
|
12050 | 0 | return -1; |
12051 | 0 | } |
12052 | 17 | if (PyModule_AddObjectRef(m, "operator", state->operator_type) < 0) { Branch (12052:9): [True: 0, False: 17]
|
12053 | 0 | return -1; |
12054 | 0 | } |
12055 | 17 | if (PyModule_AddObjectRef(m, "Add", state->Add_type) < 0) { Branch (12055:9): [True: 0, False: 17]
|
12056 | 0 | return -1; |
12057 | 0 | } |
12058 | 17 | if (PyModule_AddObjectRef(m, "Sub", state->Sub_type) < 0) { Branch (12058:9): [True: 0, False: 17]
|
12059 | 0 | return -1; |
12060 | 0 | } |
12061 | 17 | if (PyModule_AddObjectRef(m, "Mult", state->Mult_type) < 0) { Branch (12061:9): [True: 0, False: 17]
|
12062 | 0 | return -1; |
12063 | 0 | } |
12064 | 17 | if (PyModule_AddObjectRef(m, "MatMult", state->MatMult_type) < 0) { Branch (12064:9): [True: 0, False: 17]
|
12065 | 0 | return -1; |
12066 | 0 | } |
12067 | 17 | if (PyModule_AddObjectRef(m, "Div", state->Div_type) < 0) { Branch (12067:9): [True: 0, False: 17]
|
12068 | 0 | return -1; |
12069 | 0 | } |
12070 | 17 | if (PyModule_AddObjectRef(m, "Mod", state->Mod_type) < 0) { Branch (12070:9): [True: 0, False: 17]
|
12071 | 0 | return -1; |
12072 | 0 | } |
12073 | 17 | if (PyModule_AddObjectRef(m, "Pow", state->Pow_type) < 0) { Branch (12073:9): [True: 0, False: 17]
|
12074 | 0 | return -1; |
12075 | 0 | } |
12076 | 17 | if (PyModule_AddObjectRef(m, "LShift", state->LShift_type) < 0) { Branch (12076:9): [True: 0, False: 17]
|
12077 | 0 | return -1; |
12078 | 0 | } |
12079 | 17 | if (PyModule_AddObjectRef(m, "RShift", state->RShift_type) < 0) { Branch (12079:9): [True: 0, False: 17]
|
12080 | 0 | return -1; |
12081 | 0 | } |
12082 | 17 | if (PyModule_AddObjectRef(m, "BitOr", state->BitOr_type) < 0) { Branch (12082:9): [True: 0, False: 17]
|
12083 | 0 | return -1; |
12084 | 0 | } |
12085 | 17 | if (PyModule_AddObjectRef(m, "BitXor", state->BitXor_type) < 0) { Branch (12085:9): [True: 0, False: 17]
|
12086 | 0 | return -1; |
12087 | 0 | } |
12088 | 17 | if (PyModule_AddObjectRef(m, "BitAnd", state->BitAnd_type) < 0) { Branch (12088:9): [True: 0, False: 17]
|
12089 | 0 | return -1; |
12090 | 0 | } |
12091 | 17 | if (PyModule_AddObjectRef(m, "FloorDiv", state->FloorDiv_type) < 0) { Branch (12091:9): [True: 0, False: 17]
|
12092 | 0 | return -1; |
12093 | 0 | } |
12094 | 17 | if (PyModule_AddObjectRef(m, "unaryop", state->unaryop_type) < 0) { Branch (12094:9): [True: 0, False: 17]
|
12095 | 0 | return -1; |
12096 | 0 | } |
12097 | 17 | if (PyModule_AddObjectRef(m, "Invert", state->Invert_type) < 0) { Branch (12097:9): [True: 0, False: 17]
|
12098 | 0 | return -1; |
12099 | 0 | } |
12100 | 17 | if (PyModule_AddObjectRef(m, "Not", state->Not_type) < 0) { Branch (12100:9): [True: 0, False: 17]
|
12101 | 0 | return -1; |
12102 | 0 | } |
12103 | 17 | if (PyModule_AddObjectRef(m, "UAdd", state->UAdd_type) < 0) { Branch (12103:9): [True: 0, False: 17]
|
12104 | 0 | return -1; |
12105 | 0 | } |
12106 | 17 | if (PyModule_AddObjectRef(m, "USub", state->USub_type) < 0) { Branch (12106:9): [True: 0, False: 17]
|
12107 | 0 | return -1; |
12108 | 0 | } |
12109 | 17 | if (PyModule_AddObjectRef(m, "cmpop", state->cmpop_type) < 0) { Branch (12109:9): [True: 0, False: 17]
|
12110 | 0 | return -1; |
12111 | 0 | } |
12112 | 17 | if (PyModule_AddObjectRef(m, "Eq", state->Eq_type) < 0) { Branch (12112:9): [True: 0, False: 17]
|
12113 | 0 | return -1; |
12114 | 0 | } |
12115 | 17 | if (PyModule_AddObjectRef(m, "NotEq", state->NotEq_type) < 0) { Branch (12115:9): [True: 0, False: 17]
|
12116 | 0 | return -1; |
12117 | 0 | } |
12118 | 17 | if (PyModule_AddObjectRef(m, "Lt", state->Lt_type) < 0) { Branch (12118:9): [True: 0, False: 17]
|
12119 | 0 | return -1; |
12120 | 0 | } |
12121 | 17 | if (PyModule_AddObjectRef(m, "LtE", state->LtE_type) < 0) { Branch (12121:9): [True: 0, False: 17]
|
12122 | 0 | return -1; |
12123 | 0 | } |
12124 | 17 | if (PyModule_AddObjectRef(m, "Gt", state->Gt_type) < 0) { Branch (12124:9): [True: 0, False: 17]
|
12125 | 0 | return -1; |
12126 | 0 | } |
12127 | 17 | if (PyModule_AddObjectRef(m, "GtE", state->GtE_type) < 0) { Branch (12127:9): [True: 0, False: 17]
|
12128 | 0 | return -1; |
12129 | 0 | } |
12130 | 17 | if (PyModule_AddObjectRef(m, "Is", state->Is_type) < 0) { Branch (12130:9): [True: 0, False: 17]
|
12131 | 0 | return -1; |
12132 | 0 | } |
12133 | 17 | if (PyModule_AddObjectRef(m, "IsNot", state->IsNot_type) < 0) { Branch (12133:9): [True: 0, False: 17]
|
12134 | 0 | return -1; |
12135 | 0 | } |
12136 | 17 | if (PyModule_AddObjectRef(m, "In", state->In_type) < 0) { Branch (12136:9): [True: 0, False: 17]
|
12137 | 0 | return -1; |
12138 | 0 | } |
12139 | 17 | if (PyModule_AddObjectRef(m, "NotIn", state->NotIn_type) < 0) { Branch (12139:9): [True: 0, False: 17]
|
12140 | 0 | return -1; |
12141 | 0 | } |
12142 | 17 | if (PyModule_AddObjectRef(m, "comprehension", state->comprehension_type) < Branch (12142:9): [True: 0, False: 17]
|
12143 | 17 | 0) { |
12144 | 0 | return -1; |
12145 | 0 | } |
12146 | 17 | if (PyModule_AddObjectRef(m, "excepthandler", state->excepthandler_type) < Branch (12146:9): [True: 0, False: 17]
|
12147 | 17 | 0) { |
12148 | 0 | return -1; |
12149 | 0 | } |
12150 | 17 | if (PyModule_AddObjectRef(m, "ExceptHandler", state->ExceptHandler_type) < Branch (12150:9): [True: 0, False: 17]
|
12151 | 17 | 0) { |
12152 | 0 | return -1; |
12153 | 0 | } |
12154 | 17 | if (PyModule_AddObjectRef(m, "arguments", state->arguments_type) < 0) { Branch (12154:9): [True: 0, False: 17]
|
12155 | 0 | return -1; |
12156 | 0 | } |
12157 | 17 | if (PyModule_AddObjectRef(m, "arg", state->arg_type) < 0) { Branch (12157:9): [True: 0, False: 17]
|
12158 | 0 | return -1; |
12159 | 0 | } |
12160 | 17 | if (PyModule_AddObjectRef(m, "keyword", state->keyword_type) < 0) { Branch (12160:9): [True: 0, False: 17]
|
12161 | 0 | return -1; |
12162 | 0 | } |
12163 | 17 | if (PyModule_AddObjectRef(m, "alias", state->alias_type) < 0) { Branch (12163:9): [True: 0, False: 17]
|
12164 | 0 | return -1; |
12165 | 0 | } |
12166 | 17 | if (PyModule_AddObjectRef(m, "withitem", state->withitem_type) < 0) { Branch (12166:9): [True: 0, False: 17]
|
12167 | 0 | return -1; |
12168 | 0 | } |
12169 | 17 | if (PyModule_AddObjectRef(m, "match_case", state->match_case_type) < 0) { Branch (12169:9): [True: 0, False: 17]
|
12170 | 0 | return -1; |
12171 | 0 | } |
12172 | 17 | if (PyModule_AddObjectRef(m, "pattern", state->pattern_type) < 0) { Branch (12172:9): [True: 0, False: 17]
|
12173 | 0 | return -1; |
12174 | 0 | } |
12175 | 17 | if (PyModule_AddObjectRef(m, "MatchValue", state->MatchValue_type) < 0) { Branch (12175:9): [True: 0, False: 17]
|
12176 | 0 | return -1; |
12177 | 0 | } |
12178 | 17 | if (PyModule_AddObjectRef(m, "MatchSingleton", state->MatchSingleton_type) Branch (12178:9): [True: 0, False: 17]
|
12179 | 17 | < 0) { |
12180 | 0 | return -1; |
12181 | 0 | } |
12182 | 17 | if (PyModule_AddObjectRef(m, "MatchSequence", state->MatchSequence_type) < Branch (12182:9): [True: 0, False: 17]
|
12183 | 17 | 0) { |
12184 | 0 | return -1; |
12185 | 0 | } |
12186 | 17 | if (PyModule_AddObjectRef(m, "MatchMapping", state->MatchMapping_type) < 0) Branch (12186:9): [True: 0, False: 17]
|
12187 | 0 | { |
12188 | 0 | return -1; |
12189 | 0 | } |
12190 | 17 | if (PyModule_AddObjectRef(m, "MatchClass", state->MatchClass_type) < 0) { Branch (12190:9): [True: 0, False: 17]
|
12191 | 0 | return -1; |
12192 | 0 | } |
12193 | 17 | if (PyModule_AddObjectRef(m, "MatchStar", state->MatchStar_type) < 0) { Branch (12193:9): [True: 0, False: 17]
|
12194 | 0 | return -1; |
12195 | 0 | } |
12196 | 17 | if (PyModule_AddObjectRef(m, "MatchAs", state->MatchAs_type) < 0) { Branch (12196:9): [True: 0, False: 17]
|
12197 | 0 | return -1; |
12198 | 0 | } |
12199 | 17 | if (PyModule_AddObjectRef(m, "MatchOr", state->MatchOr_type) < 0) { Branch (12199:9): [True: 0, False: 17]
|
12200 | 0 | return -1; |
12201 | 0 | } |
12202 | 17 | if (PyModule_AddObjectRef(m, "type_ignore", state->type_ignore_type) < 0) { Branch (12202:9): [True: 0, False: 17]
|
12203 | 0 | return -1; |
12204 | 0 | } |
12205 | 17 | if (PyModule_AddObjectRef(m, "TypeIgnore", state->TypeIgnore_type) < 0) { Branch (12205:9): [True: 0, False: 17]
|
12206 | 0 | return -1; |
12207 | 0 | } |
12208 | 17 | return 0; |
12209 | 17 | } |
12210 | | |
12211 | | static PyModuleDef_Slot astmodule_slots[] = { |
12212 | | {Py_mod_exec, astmodule_exec}, |
12213 | | {0, NULL} |
12214 | | }; |
12215 | | |
12216 | | static struct PyModuleDef _astmodule = { |
12217 | | PyModuleDef_HEAD_INIT, |
12218 | | .m_name = "_ast", |
12219 | | // The _ast module uses a per-interpreter state (PyInterpreterState.ast) |
12220 | | .m_size = 0, |
12221 | | .m_slots = astmodule_slots, |
12222 | | }; |
12223 | | |
12224 | | PyMODINIT_FUNC |
12225 | | PyInit__ast(void) |
12226 | 17 | { |
12227 | 17 | return PyModuleDef_Init(&_astmodule); |
12228 | 17 | } |
12229 | | |
12230 | | |
12231 | | PyObject* PyAST_mod2obj(mod_ty t) |
12232 | 8.94k | { |
12233 | 8.94k | struct ast_state *state = get_ast_state(); |
12234 | 8.94k | if (state == NULL) { Branch (12234:9): [True: 0, False: 8.94k]
|
12235 | 0 | return NULL; |
12236 | 0 | } |
12237 | 8.94k | return ast2obj_mod(state, t); |
12238 | 8.94k | } |
12239 | | |
12240 | | /* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */ |
12241 | | mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode) |
12242 | 688 | { |
12243 | 688 | const char * const req_name[] = {"Module", "Expression", "Interactive"}; |
12244 | 688 | int isinstance; |
12245 | | |
12246 | 688 | if (PySys_Audit("compile", "OO", ast, Py_None) < 0) {Line | Count | Source | 654 | 688 | #define Py_None (&_Py_NoneStruct) |
Branch (12246:9): [True: 0, False: 688]
|
12247 | 0 | return NULL; |
12248 | 0 | } |
12249 | | |
12250 | 688 | struct ast_state *state = get_ast_state(); |
12251 | 688 | if (state == NULL) { Branch (12251:9): [True: 0, False: 688]
|
12252 | 0 | return NULL; |
12253 | 0 | } |
12254 | | |
12255 | 688 | PyObject *req_type[3]; |
12256 | 688 | req_type[0] = state->Module_type; |
12257 | 688 | req_type[1] = state->Expression_type; |
12258 | 688 | req_type[2] = state->Interactive_type; |
12259 | | |
12260 | 688 | assert(0 <= mode && mode <= 2); |
12261 | | |
12262 | 688 | isinstance = PyObject_IsInstance(ast, req_type[mode]); |
12263 | 688 | if (isinstance == -1) Branch (12263:9): [True: 0, False: 688]
|
12264 | 0 | return NULL; |
12265 | 688 | if (!isinstance) { Branch (12265:9): [True: 2, False: 686]
|
12266 | 2 | PyErr_Format(PyExc_TypeError, "expected %s node, got %.400s", |
12267 | 2 | req_name[mode], _PyType_Name(Py_TYPE(ast))); Line | Count | Source | 138 | 2 | # define Py_TYPE(ob) Py_TYPE(_PyObject_CAST(ob)) Line | Count | Source | 109 | 2 | #define _PyObject_CAST(op) _Py_CAST(PyObject*, (op)) Line | Count | Source | 71 | 2 | # define _Py_CAST(type, expr) ((type)(expr)) |
|
|
|
12268 | 2 | return NULL; |
12269 | 2 | } |
12270 | | |
12271 | 686 | mod_ty res = NULL; |
12272 | 686 | if (obj2ast_mod(state, ast, &res, arena) != 0) Branch (12272:9): [True: 7, False: 679]
|
12273 | 7 | return NULL; |
12274 | 679 | else |
12275 | 679 | return res; |
12276 | 686 | } |
12277 | | |
12278 | | int PyAST_Check(PyObject* obj) |
12279 | 17.8k | { |
12280 | 17.8k | struct ast_state *state = get_ast_state(); |
12281 | 17.8k | if (state == NULL) { Branch (12281:9): [True: 0, False: 17.8k]
|
12282 | 0 | return -1; |
12283 | 0 | } |
12284 | 17.8k | return PyObject_IsInstance(obj, state->AST_type); |
12285 | 17.8k | } |
12286 | | |
12287 | | |